Run CLJS unit tests when building desktop

Signed-off-by: George Lipov <gnl@lipov.net>
This commit is contained in:
George Lipov 2018-09-25 20:01:48 +03:00
parent 17a8d3a9c9
commit e1c0dff406
No known key found for this signature in database
GPG Key ID: 335432A084BC0C3A
6 changed files with 48 additions and 28 deletions

View File

@ -8,7 +8,7 @@ pipeline {
artifactNumToKeepStr: '60',
))
}
environment {
LANG = 'en_US.UTF-8'
LANGUAGE = 'en_US.UTF-8'
@ -21,7 +21,7 @@ pipeline {
ANDROID_NDK = '/usr/lib/android-ndk'
ANDROID_NDK_HOME = '/usr/lib/android-ndk'
}
stages {
stage('Prep') {
steps {
@ -36,12 +36,12 @@ pipeline {
}
stage('Lint') {
steps {
script { mobile.runLint() }
script { cmn.runLint() }
}
}
stage('Tests') {
steps {
script { mobile.runTests() }
script { cmn.runTests() }
}
}
stage('Build') {
@ -69,7 +69,7 @@ pipeline {
env.DIAWI_URL = mobile.android.uploadToDiawi(); break;
case 'e2e':
env.SAUCE_URL = mobile.android.uploadToSauceLabs()
}
}
}
}
}

View File

@ -8,7 +8,7 @@ pipeline {
artifactNumToKeepStr: '30',
))
}
environment {
LANG = 'en_US.UTF-8'
LANGUAGE = 'en_US.UTF-8'
@ -17,7 +17,7 @@ pipeline {
REALM_DISABLE_ANALYTICS=1
BUNDLE_PATH = "${HOME}/.bundle"
}
stages {
stage('Prep') {
steps {
@ -32,12 +32,12 @@ pipeline {
}
stage('Lint') {
steps {
script { mobile.runLint() }
script { cmn.runLint() }
}
}
stage('Tests') {
steps {
script { mobile.runTests() }
script { cmn.runTests() }
}
}
stage('Build') {

View File

@ -1,11 +1,11 @@
pipeline {
agent {
agent {
/* privileged mode is necessary for fuse */
docker {
label 'linux-new'
image 'statusteam/linux-desktop-ubuntu:16.04'
args (
"--privileged "+
"--privileged "+
"-v /dev/fuse:/dev/fuse "+
"-v /var/tmp/lein:/var/tmp/lein:rw "+
"-v /var/tmp/npm:/var/tmp/npm:rw "+
@ -21,7 +21,7 @@ pipeline {
artifactNumToKeepStr: '30',
))
}
/**
* WARNING: Jenkins ignores PATH changes in Docker
* https://issues.jenkins-ci.org/browse/JENKINS-49076
@ -35,7 +35,7 @@ pipeline {
QT_PATH = '/opt/qt59'
STATUSIM_APPIMAGE = '/opt/StatusImAppImage.zip'
}
stages {
stage('Prep') {
steps {
@ -48,6 +48,16 @@ pipeline {
}
}
}
stage('Lint') {
steps {
script { cmn.runLint() }
}
}
stage('Tests') {
steps {
script { cmn.runTests() }
}
}
stage('Build') {
steps {
script { desktop.buildClojureScript() }

View File

@ -8,7 +8,7 @@ pipeline {
artifactNumToKeepStr: '30',
))
}
environment {
LANG = 'en_US.UTF-8'
LANGUAGE = 'en_US.UTF-8'
@ -16,7 +16,7 @@ pipeline {
QT_PATH = '/Users/administrator/qt/5.9.1'
PATH = "${env.QT_PATH}/clang_64/bin:${env.PATH}"
}
stages {
stage('Prep') {
steps {
@ -28,6 +28,16 @@ pipeline {
}
}
}
stage('Lint') {
steps {
script { cmn.runLint() }
}
}
stage('Tests') {
steps {
script { cmn.runTests() }
}
}
stage('Build') {
steps {
script { desktop.buildClojureScript() }

View File

@ -15,7 +15,7 @@ def getBuildType() {
}
return params.BUILD_TYPE
}
def buildBranch(name = null, buildType) {
/* need to drop origin/ to match definitions of child jobs */
def branchName = env.GIT_BRANCH.replace('origin/', '')
@ -143,13 +143,13 @@ def githubNotify(apkUrl, e2eUrl, ipaUrl, dmgUrl, appUrl, changeId) {
"* [AppImage](${appUrl})"
}
def script = (
"curl "+
"-u status-im:${githubToken} " +
"-H 'Content-Type: application/json' " +
"curl "+
"-u status-im:${githubToken} " +
"-H 'Content-Type: application/json' " +
"--data '{\"body\": \"${message}\"}' " +
"https://api.github.com/repos/status-im/status-react/issues/${changeId}/comments"
)
def ghOutput = sh(returnStdout: true, script: script)
def ghOutput = sh(returnStdout: true, script: script)
println("Result of github comment curl: " + ghOutput);
}
}
@ -160,4 +160,12 @@ def getParentRunEnv(name) {
return c.getUpstreamRun().getEnvironment()[name]
}
def runLint() {
sh 'lein cljfmt check'
}
def runTests() {
sh 'lein test-cljs'
}
return this

View File

@ -59,14 +59,6 @@ def prep(type = 'nightly') {
}
}
def runLint() {
sh 'lein cljfmt check'
}
def runTests() {
sh 'lein test-cljs'
}
def leinBuild(platform) {
sh "lein prod-build-${platform}"
}