Skip to content

Commit

Permalink
forgot to put "parallel" when parallelizing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-simpson committed Apr 20, 2024
1 parent 18fd64d commit 3c0c1b2
Showing 1 changed file with 146 additions and 144 deletions.
290 changes: 146 additions & 144 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,154 +187,156 @@ pipeline {
}

stage('Instrument tests') {
stage('F2 Tests') {
when {
expression { runtests_f2 == 1 }
}
parallel {
stage('F2 Tests') {
when {
expression { runtests_f2 == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "f2_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/f2/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-f2 -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/f2_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F f2'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside F2 Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-f2/reports/*_results.xml'
)
echo "Deleting F2 Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
stage('GSAOI Tests') {
when {
expression { runtests_gsaoi == 1 }
}
agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "f2_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/f2/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-f2 -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/f2_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F f2'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside F2 Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-f2/reports/*_results.xml'
)
echo "Deleting F2 Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
stage('GSAOI Tests') {
when {
expression { runtests_gsaoi == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "gsaoi_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/gsaoi/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-gsaoi -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/gsaoi_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F gsaoi'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside GSAOI Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-gsaoi/reports/*_results.xml'
)
echo "Deleting GSAOI Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
stage('NIRI Tests') {
when {
expression { runtests_niri == 1 }
}
agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "gsaoi_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/gsaoi/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-gsaoi -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/gsaoi_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F gsaoi'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside GSAOI Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-gsaoi/reports/*_results.xml'
)
echo "Deleting GSAOI Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
stage('NIRI Tests') {
when {
expression { runtests_niri == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "niri_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/niri/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-niri -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/niri_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F niri'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside NIRI Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-niri/reports/*_results.xml'
)
echo "Deleting NIRI Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
stage('GNIRS Tests') {
when {
expression { runtests_gnirs == 1 }
}
agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "niri_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/niri/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-niri -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/niri_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F niri'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside NIRI Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-niri/reports/*_results.xml'
)
echo "Deleting NIRI Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
stage('GNIRS Tests') {
when {
expression { runtests_gnirs == 1 }
}

agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "gnirs_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/gnirs/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-gnirs -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/gnirs_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F gnirs'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside GNIRS Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-gnirs/reports/*_results.xml'
)
echo "Deleting GNIRS Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
agent { label "master" }
environment {
MPLBACKEND = "agg"
DRAGONS_TEST_OUT = "gnirs_tests_outputs"
TOX_ARGS = "astrodata geminidr gemini_instruments gempy recipe_system"
TMPDIR = "${env.WORKSPACE}/.tmp/gnirs/"
}
steps {
echo "Running build #${env.BUILD_ID} on ${env.NODE_NAME}"
checkout scm
sh '.jenkins/scripts/setup_dirs.sh'
echo "Running tests"
sh 'tox -e py310-gnirs -v -- --basetemp=${DRAGONS_TEST_OUT} --junit-xml reports/gnirs_results.xml ${TOX_ARGS}'
echo "Reporting coverage"
sh 'tox -e codecov -- -F gnirs'
} // end steps
post {
always {
echo "Running 'archivePlots' from inside GNIRS Tests"
archiveArtifacts artifacts: "plots/*", allowEmptyArchive: true
junit (
allowEmptyResults: true,
testResults: '.tmp/py310-gnirs/reports/*_results.xml'
)
echo "Deleting GNIRS Tests workspace ${env.WORKSPACE}"
cleanWs()
dir("${env.WORKSPACE}@tmp") {
deleteDir()
}
} // end always
} // end post
} // end stage
} // end parallel
}

stage('WaveCal Tests') {
Expand Down

0 comments on commit 3c0c1b2

Please sign in to comment.