diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffb56d3ab..74ffbbac8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,5 +43,6 @@ jobs: CRDS_CLIENT_RETRY_COUNT: 3 CRDS_CLIENT_RETRY_DELAY_SECONDS: 20 envs: | - - linux: py311-jwst-cov-xdist - - linux: py311-romancal-cov-xdist + - linux: jwst-cov + - linux: romancal-cov + coverage: codecov diff --git a/tox.ini b/tox.ini index 557aed11a..d22766f41 100644 --- a/tox.ini +++ b/tox.ini @@ -5,6 +5,8 @@ envlist = test-numpy{120,121,122} test-{jwst,romancal}-xdist build-{docs,dist} + jwst{,-cov} + romancal{,-cov} # tox environments are constructed with so-called 'factors' (or terms) # separated by hyphens, e.g. test-devdeps-cov. Lines below starting with factor: @@ -53,10 +55,10 @@ description = xdist: using parallel processing extras = test +allowlist_external = + git deps = xdist: pytest-xdist - jwst: jwst[test] @ git+https://github.com/spacetelescope/jwst.git - romancal: romancal[test] @ git+https://github.com/spacetelescope/romancal.git oldestdeps: minimum_dependencies devdeps: numpy>=0.0.dev0 devdeps: scipy>=0.0.dev0 @@ -71,14 +73,8 @@ deps = use_develop = true pass_env = CI - WEBBPSF_PATH set_env = devdeps: PIP_EXTRA_INDEX_URL = https://pypi.anaconda.org/astropy/simple https://pypi.anaconda.org/liberfa/simple https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - jwst: CRDS_SERVER_URL=https://jwst-crds.stsci.edu - romancal: CRDS_SERVER_URL=https://roman-crds.stsci.edu - jwst,romancal: CRDS_PATH={package_root}/crds_cache - jwst,romancal: CRDS_CLIENT_RETRY_COUNT=3 - jwst,romancal: CRDS_CLIENT_RETRY_DELAY_SECONDS=20 commands_pre = oldestdeps: minimum_dependencies stcal --filename requirements-min.txt oldestdeps: pip install -r requirements-min.txt @@ -87,8 +83,6 @@ commands = pytest \ warnings: -W error \ xdist: -n auto \ - jwst: --pyargs jwst --ignore-glob=timeconversion --ignore-glob=associations --ignore-glob=*/scripts/* \ - romancal: --pyargs romancal \ cov: --cov=. --cov-config=pyproject.toml --cov-report=term-missing --cov-report=xml \ {posargs} @@ -106,3 +100,53 @@ deps = build commands = python -m build . + +[testenv:jwst] +deps= + pytest-xdist +change_dir = {env_tmp_dir} +allowlist_externals = + git + bash +extras = +set_env = + CRDS_SERVER_URL = https://jwst-crds.stsci.edu + CRDS_PATH = {package_root}crds_cache + CRDS_CLIENT_RETRY_COUNT = 3 + CRDS_CLIENT_RETRY_DELAY_SECONDS = 20 +commands_pre = + bash -c "pip freeze -q | grep 'stcal @' > {env_tmp_dir}/requirements.txt" + git clone https://github.com/spacetelescope/jwst.git + pip install -e jwst[test] + pip install -r {env_tmp_dir}/requirements.txt + pip freeze +commands = + pytest --numprocesses auto jwst \ + cov: --cov=. --cov-config=pyproject.toml --cov-report=term-missing \ + {posargs} + +[testenv:romancal] +deps= + pytest-xdist +change_dir = {env_tmp_dir} +allowlist_externals = + git + bash +extras = +pass_env = + WEBBPSF_PATH +set_env = + CRDS_SERVER_URL = https://roman-crds.stsci.edu + CRDS_PATH = {package_root}crds_cache + CRDS_CLIENT_RETRY_COUNT = 3 + CRDS_CLIENT_RETRY_DELAY_SECONDS = 20 +commands_pre = + bash -c "pip freeze -q | grep 'stcal @' > {env_tmp_dir}/requirements.txt" + git clone https://github.com/spacetelescope/romancal.git + pip install -e romancal[test] + pip install -r {env_tmp_dir}/requirements.txt + pip freeze +commands = + pytest --numprocesses auto jwst \ + cov: --cov=. --cov-config=pyproject.toml --cov-report=term-missing \ + {posargs}