Skip to content

Commit

Permalink
don't install from source (instead manually list test dependencies)
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Aug 6, 2024
1 parent d1f36c2 commit f8fb691
Showing 1 changed file with 63 additions and 23 deletions.
86 changes: 63 additions & 23 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,59 @@ jobs:
python-version: [ '3.10', '3.11', '3.12' ]
include:
- package: acstools
extras: [ all, test ]
test-dependencies: >-
matplotlib
scipy
scikit-image
stsci.tools
stsci.imagestats
photutils
dask
pytest
pytest-astropy-header
pytest-remotedata
ci-watson
pytest-args: --remote-data -v
- package: asdf
extras: [ all, tests ]
test-dependencies: >-
"lz4>=0.10"
"fsspec[http]>=2022.8.2"
"lz4>=0.10"
psutil
"pytest>=8"
pytest-remotedata
pytest-args: --remote-data --durations=10
- package: ccdproc
extras: [ test ]
test-dependencies: >-
pytest-astropy>=0.10.0
memory_profiler
pytest-args: -W ignore
- package: costools
extras: [ test ]
test-dependencies: >-
pytest
pytest-cov
- package: jwst
extras: [ test ]
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"
crds-observatory: jwst
#- package: pysynphot
# extras: [ test ]
# - package: pysynphot
# test-dependencies: >-
# pytest
# pytest-remotedata
- package: reftools
extras: [ test ]
test-dependencies: >-
pytest-remotedata
pytest-astropy-header
- package: synphot
extras: [ test ]
test-dependencies: >-
pytest-astropy
- package: wfpc2tools
exclude:
- runs-on: macos-13
Expand Down Expand Up @@ -91,9 +125,7 @@ jobs:
cache-environment-key: environment-${{ needs.build.outputs.date }}
init-shell: none
generate-run-shell: true
- if: matrix.extras != ''
run: pip install "${{ matrix.package }}[${{ join(matrix.extras, ',') }}]"
- run: pip install pytest-xdist
- run: pip install ${{ matrix.test-dependencies }} pytest pytest-xdist
- run: pip list
- run: pytest --pyargs ${{ matrix.package }} ${{ matrix.pytest-args }} -n auto
test_from_source:
Expand All @@ -107,22 +139,33 @@ jobs:
include:
- package: calcos
repository: spacetelescope/calcos
extras: [ test ]
test-dependencies: >-
ci-watson
pytest
pytest-cov
pytest-args: --slow
#- package: drizzlepac
# repository: spacetelescope/drizzlepac
# extras: [ test ]
# test-dependencies: >-
# ci_watson
# crds
# pytest
# pytest-remotedata
- package: hstcal
repository: spacetelescope/hstcal
test-dependencies: crds ci_watson
test-dependencies: >-
crds
ci_watson
pytest-args: --slow
test-directory: tests
crds-observatory: hst
#- package: stistools
# repository: spacetelescope/stistools
# - package: stsynphot
# repository: spacetelescope/stsynphot_refactor
# extras: [ test ]
#- package: stsynphot
# repository: spacetelescope/stsynphot_refactor
# test-dependencies: >-
# pytest-astropy
# ci-watson
exclude:
- runs-on: macos-13
python-version: '3.10'
Expand Down Expand Up @@ -171,9 +214,6 @@ jobs:
repository: ${{ matrix.repository }}
ref: ${{ steps.package_version.outputs.version }}
fetch-depth: 0
- if: matrix.extras != ''
run: pip install -e ".[${{ join(matrix.extras, ',') }}]"
working-directory: ${{ matrix.package }}
- run: pip install ${{ matrix.test-dependencies }} pytest pytest-xdist
- run: pip list
- if: matrix.pre_command != ''
Expand Down Expand Up @@ -309,9 +349,9 @@ jobs:
cache-environment-key: environment-${{ needs.build.outputs.date }}
init-shell: none
generate-run-shell: true
- if: matrix.extras != ''
run: pip install ".[${{ join(matrix.extras, ',') }}]"
- run: pip install pytest-xdist
- if: matrix.test-dependencies != ''
run: pip install ${{ matrix.test-dependencies }}
- run: pip list
- uses: actions/cache@v4
with:
Expand Down

0 comments on commit f8fb691

Please sign in to comment.