Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing 3.11 test command #1808

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 104 additions & 39 deletions JenkinsfileRT
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (env.ARTIFACTORY_ENV) {
artifactory_env = env.ARTIFACTORY_ENV
}

codecov_install = "curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov"
codecov_exec = "curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov"

// Allow modification of the job configuration, affects all relevant
// build configs.
Expand All @@ -25,50 +25,115 @@ data_config.server_id = 'bytesalad'
data_config.root = 'clone/tests_output'
data_config.match_prefix = '(.*)_result' // .json is appended automatically

// Test 1 ///////////////////////////
bc1 = new BuildConfig()
// Regression testing config
bc_rt = new BuildConfig()
bc_rt.env_vars += [
'TEST_BIGDATA=https://bytesalad.stsci.edu/artifactory',
'CFLAGS=-std=gnu99',
'crrefer=/grp/crds/cache/references/hst',
'iref=${crrefer}/',
'jref=${crrefer}/',
'jtab=${crrefer}/',
'lref=${crrefer}/',
'mtab=${crrefer}/',
'nref=${crrefer}/',
'ntab=${crrefer}/',
'oref=${crrefer}/',
'otab=${crrefer}/',
'uref=${crrefer}/'
]
bc_rt.build_cmds = [
"pip install .",
"pip freeze"
]
bc_rt.test_cmds = [
"pip install -e '.[test]'",
"pytest --env=${artifactory_env} --cov=./ --basetemp=tests_output --junitxml=results.xml --slow --bigdata",
"${codecov_exec}"
]
bc_rt.test_configs = [data_config]
bc_rt.failedFailureThresh = 0

// Unit testing config
bc_unit = utils.copy(bc_rt)
bc_unit.test_cmds = [
"pip install -e '.[test]'",
"pytest --env=${artifactory_env} --cov=./ --basetemp=tests_output --junitxml=results.xml",
"${codecov_exec}"
]
bc_unit.test_configs = []

// Unit testing (dev) config
bc_unit_dev = utils.copy(bc_unit)
bc_unit_dev.build_cmds = [
"pip install -r requirements-dev.txt --upgrade . || true",
"pip freeze || true"
]
bc_unit_dev.test_cmds = [
"pip install -r requirements-dev.txt --upgrade -e '.[test]' || true",
"pytest --env=${artifactory_env} --cov=./ --basetemp=tests_output --junitxml=results.xml",
"${codecov_exec}"
]
bc_unit_dev.failedFailureThresh = 1000


// Linux regression tests
bc1 = utils.copy(bc_rt)
bc1.nodetype = 'linux'
bc1.env_vars = ['TEST_BIGDATA=https://bytesalad.stsci.edu/artifactory']
bc1.name = '3.10'
bc1.conda_packages = ['python=3.10']
bc1.build_cmds = ["pip install numpy astropy pytest-cov ci-watson",
"pip install --upgrade -e '.[test]'",
"pip freeze"]
bc1.test_cmds = ["pytest --env=${artifactory_env} --cov=./ --basetemp=tests_output --junitxml=results.xml --bigdata",
"${codecov_install}",
"./codecov"]
bc1.test_configs = [data_config]
bc1.failedFailureThresh = 0

// Test 2 ///////////////////////////
bc2 = utils.copy(bc1)
bc2.name = '3.11'
bc1.name = '3.11-rt'
bc1.conda_packages = ['python=3.11']

// Linux
bc2 = utils.copy(bc_unit)
bc2.nodetype = 'linux'
bc2.name = '3.11-unit'
bc2.conda_packages = ['python=3.11']

// Test 3 ///////////////////////////
bc3 = utils.copy(bc1)
bc3.name = '3.12'
bc3.conda_packages = ['python=3.12']
bc3 = utils.copy(bc_unit_dev)
bc3.name = '3.11-unit-dev'
bc3.nodetype = 'linux'
bc3.conda_packages = ['python=3.11']

// Test 4 ///////////////////////////
bc4 = new BuildConfig()
bc4 = utils.copy(bc_unit)
bc4.nodetype = 'linux'
bc4.env_vars = ['TEST_BIGDATA=https://bytesalad.stsci.edu/artifactory']
bc4.name = '3.11-dev'
bc4.conda_packages = ['python=3.11']
bc4.build_cmds = ["pip install numpy astropy pytest-cov ci-watson || true",
"pip install --upgrade -e '.[test]' || true",
"pip install -r requirements-dev.txt || true",
"pip freeze || true"]
bc4.test_cmds = ["pytest --env=${artifactory_env} --cov=./ --basetemp=tests_output --junitxml=results.xml --bigdata || true",
"${codecov_install}",
"./codecov || true"]
bc4.test_configs = [data_config]
// Apply a large failure threshold to prevent marking the pipeline job failed
// when xunit ingests any test results
bc4.failedFailureThresh = 1000
bc4.name = '3.12-unit'
bc4.conda_packages = ['python=3.12']

bc5 = utils.copy(bc_unit_dev)
bc5.nodetype = 'linux'
bc5.name = '3.12-unit-dev'
bc5.conda_packages = ['python=3.12']


// Mac OS regression tests
bc6 = utils.copy(bc_rt)
bc6.nodetype = 'macos_x86_64'
bc6.name = '3.11-rt'
bc6.conda_packages = ['python=3.11']

// Mac OS unit tests
bc7 = utils.copy(bc_unit)
bc7.nodetype = 'macos_x86_64'
bc7.name = '3.11-unit'
bc7.conda_packages = ['python=3.11']

bc8 = utils.copy(bc_unit_dev)
bc8.nodetype = 'macos_x86_64'
bc8.name = '3.11-unit-dev'
bc8.conda_packages = ['python=3.11']

bc9 = utils.copy(bc_unit)
bc9.nodetype = 'macos_x86_64'
bc9.name = '3.12-unit'
bc9.conda_packages = ['python=3.12']

bc10 = utils.copy(bc_unit_dev)
bc10.nodetype = 'macos_x86_64'
bc10.name = '3.12-unit-dev'
bc10.conda_packages = ['python=3.12']


// Iterate over configurations that define the (distributed) build matrix.
// Spawn a host (or workdir) for each combination and run in parallel.
// Also apply the job configuration defined in `jobconfig` above.
utils.run([bc1, bc2, bc3, bc4, jobconfig])
utils.run([bc1, bc2, bc3, bc4, bc5, bc6, bc7, bc8, bc9, bc10, jobconfig])
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ test = [
"ci_watson",
"crds",
"pytest",
"pytest-cov",
"pytest-remotedata",
]

Expand Down
Loading