Skip to content

Commit

Permalink
ci: [ANDROAPP-6713] add tablet on landscape for instrumentation testing
Browse files Browse the repository at this point in the history
Signed-off-by: andresmr <[email protected]>
  • Loading branch information
andresmr committed Dec 11, 2024
1 parent 130c8fe commit ffadd59
Showing 1 changed file with 15 additions and 97 deletions.
112 changes: 15 additions & 97 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,6 @@ pipeline {
}
}
}
/* stage('Lint Check') {
steps {
script {
echo 'Running Ktlint'
sh './gradlew ktlintCheck'
}
}
} */
/* stage('Unit tests') {
environment {
ANDROID_HOME = '/opt/android-sdk'
}
steps {
script {
echo 'Running unit tests on app module'
sh './gradlew :app:testDhisDebugUnitTest --stacktrace --no-daemon'
echo 'Running unit tests on all other modules'
sh './gradlew testDebugUnitTest --stacktrace --no-daemon'
}
}
} */
stage('Build Test APKs') {
steps {
script {
Expand All @@ -55,87 +34,26 @@ pipeline {
}
}
}
stage('Run tests') {
// parallel {
/* stage('Deploy and run Form Tests') {
environment {
BROWSERSTACK = credentials('android-browserstack')
form_apk = sh(returnStdout: true, script: 'find form/build/outputs -iname "*.apk" | sed -n 1p')
form_apk_path = "${env.WORKSPACE}/${form_apk}"
buildTag = "${env.GIT_BRANCH} - form"
}
steps {
dir("${env.WORKSPACE}/scripts"){
script {
echo 'Browserstack deployment and running Form module tests'
sh 'chmod +x browserstackJenkinsForm.sh'
sh './browserstackJenkinsForm.sh'
}
}
}
}
stage('Deploy compose-table module Tests') {
environment {
BROWSERSTACK = credentials('android-browserstack')
compose_table_apk = sh(returnStdout: true, script: 'find compose-table/build/outputs -iname "*.apk" | sed -n 1p')
compose_table_apk_path = "${env.WORKSPACE}/${compose_table_apk}"
buildTag = "${env.GIT_BRANCH} - table"
}
steps {
dir("${env.WORKSPACE}/scripts"){
script {
echo 'Browserstack deployment and running compose-table module tests'
sh 'chmod +x browserstackJenkinsCompose.sh'
sh './browserstackJenkinsCompose.sh'
}
}
}
} */
stage('Deploy and Run UI Tests') {
environment {
BROWSERSTACK = credentials('android-browserstack')
app_apk = sh(returnStdout: true, script: 'find app/build/outputs -iname "*.apk" | sed -n 1p')
test_apk = sh(returnStdout: true, script: 'find app/build/outputs -iname "*.apk" | sed -n 2p')
app_apk_path = "${env.WORKSPACE}/${app_apk}"
test_apk_path = "${env.WORKSPACE}/${test_apk}"
buildTag = "${env.GIT_BRANCH}"
}
steps {
dir("${env.WORKSPACE}/scripts"){
script {
echo 'Browserstack deployment and running tests'
sh 'chmod +x browserstackJenkins.sh'
sh './browserstackJenkins.sh'
}
}
}
}
// }
}
/* stage('JaCoCo report') {
steps {
script {
echo 'Running JaCoCo report on app module'
sh './gradlew jacocoReport --stacktrace --no-daemon'
}
}
}
stage('Sonarqube') {

stage('Deploy and Run UI Tests') {
environment {
GIT_BRANCH = "${env.GIT_BRANCH}"
// Jenkinsfile considers empty value ('') as null
GIT_BRANCH_DEST = "${env.CHANGE_TARGET == null ? '' : env.CHANGE_TARGET}"
PULL_REQUEST = "${env.CHANGE_ID == null ? '' : env.CHANGE_ID }"
SONAR_TOKEN = credentials('android-sonarcloud-token')
BROWSERSTACK = credentials('android-browserstack')
app_apk = sh(returnStdout: true, script: 'find app/build/outputs -iname "*.apk" | sed -n 1p')
test_apk = sh(returnStdout: true, script: 'find app/build/outputs -iname "*.apk" | sed -n 2p')
app_apk_path = "${env.WORKSPACE}/${app_apk}"
test_apk_path = "${env.WORKSPACE}/${test_apk}"
buildTag = "${env.GIT_BRANCH}"
}
steps {
script {
echo 'Running Sonarqube'
sh 'chmod +x ./scripts/sonarqube.sh'
sh './scripts/sonarqube.sh'
dir("${env.WORKSPACE}/scripts"){
script {
echo 'Browserstack deployment and running tests'
sh 'chmod +x browserstackJenkins.sh'
sh './browserstackJenkins.sh'
}
}
}
} */
}

}
post {
Expand Down

0 comments on commit ffadd59

Please sign in to comment.