From 7c2b6660be5ae2de7535d5234a8d1b37568f5103 Mon Sep 17 00:00:00 2001 From: Zach Burnett Date: Thu, 29 Aug 2024 09:44:59 -0400 Subject: [PATCH] override environment after installing extra (#167) --- .github/workflows/test.yaml | 68 ++++++++++--------------------------- 1 file changed, 17 insertions(+), 51 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index af2228a..c6b8779 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -35,59 +35,27 @@ jobs: python-version: [ '3.10', '3.11', '3.12' ] include: - package: acstools - test-dependencies: >- - matplotlib - scipy - scikit-image - stsci.tools - stsci.imagestats - photutils - dask - pytest - pytest-astropy-header - pytest-remotedata - ci-watson + test-extras: test pytest-args: --remote-data -v - package: asdf - test-dependencies: >- - "lz4>=0.10" - "fsspec[http]>=2022.8.2" - "lz4>=0.10" - psutil - "pytest>=8" - pytest-remotedata + test-extras: tests pytest-args: --remote-data --durations=10 - package: ccdproc - test-dependencies: >- - pytest-astropy>=0.10.0 - memory_profiler + test-extras: test pytest-args: -W ignore - package: costools - test-dependencies: >- - pytest - pytest-cov + test-extras: test - package: jwst - test-dependencies: >- - "ci-watson>=0.5.0" - "colorama>=0.4.1" - "readchar>=3.0" - ruff - "pytest>=6.0.0" - "pytest-cov>=2.9.0" - "pytest-doctestplus>=0.10.0" - "requests_mock>=1.0" + test-extras: test crds-observatory: jwst # - package: pysynphot # test-dependencies: >- # pytest # pytest-remotedata - package: reftools - test-dependencies: >- - pytest-remotedata - pytest-astropy-header + test-dependencies: test - package: synphot - test-dependencies: >- - pytest-astropy + test-dependencies: test - package: wfpc2tools exclude: - runs-on: macos-13 @@ -126,6 +94,9 @@ jobs: init-shell: none generate-run-shell: true - run: pip install pytest pytest-xdist ${{ matrix.test-dependencies }} + - if: matrix.test-extras != '' + run: pip install ${{ matrix.package }}[${{ matrix.test-extras }}] + - run: micromamba update -f environment.yaml - run: pip list - run: pytest --pyargs ${{ matrix.package }} ${{ matrix.pytest-args }} -n auto --dist=loadscope test_from_source: @@ -139,18 +110,11 @@ jobs: include: - package: calcos repository: spacetelescope/calcos - test-dependencies: >- - ci-watson - pytest - pytest-cov + test-extras: test pytest-args: --slow - package: drizzlepac repository: spacetelescope/drizzlepac - test-dependencies: >- - ci_watson - crds - pytest - pytest-remotedata + test-extras: test - package: hstcal repository: spacetelescope/hstcal test-dependencies: >- @@ -163,9 +127,7 @@ jobs: repository: spacetelescope/stistools - package: stsynphot repository: spacetelescope/stsynphot_refactor - test-dependencies: >- - pytest-astropy - ci-watson + test-extras: test exclude: - runs-on: macos-13 python-version: '3.10' @@ -215,9 +177,13 @@ jobs: ref: ${{ steps.package_version.outputs.version }} fetch-depth: 0 - run: pip install pytest pytest-xdist ${{ matrix.test-dependencies }} + - if: matrix.test-extras != '' + run: pip install .[${{ matrix.test-extras }}] + working-directory: ${{ matrix.package }} - if: matrix.package != 'hstcal' run: pip install -e . working-directory: ${{ matrix.package }} + - run: micromamba update -f stenv/environment.yaml - run: pip list - if: matrix.pre_command != '' run: ${{ matrix.pre_command }}