Skip to content

Commit

Permalink
test environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Jul 25, 2022
1 parent db7fce4 commit 1241887
Showing 1 changed file with 33 additions and 13 deletions.
46 changes: 33 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ jobs:
#- package: wfc3tools
# dependencies: [ ]
- package: wfpc2tools
env:
PYSYN_CDBS: ${{ env.HOME }}/trds
CRDS_PATH: ${{ env.HOME }}/crds_cache
CRDS_SERVER_URL: ${{ matrix.CRDS_SERVER_URL }}
steps:
- uses: actions/checkout@v3.0.2
- if: runner.os == 'Linux'
Expand Down Expand Up @@ -127,11 +131,13 @@ jobs:
- run: conda install -y pytest pytest-xdist
- run: pip install ${{ join(matrix.dependencies, ' ') }}
if: matrix.dependencies != ''
- run: echo "CRDS_CONTEXT=$(crds list --operational-context)" >> $GITHUB_ENV
if: ${{ matrix.CRDS_SERVER_URL }} != ''
- uses: actions/cache@v3.0.5
with:
path: ${{ env.HOME }}/crds_cache
key: crds-${{ env.CRDS_CONTEXT }}
- run: pytest -n auto ${{ matrix.pytest_args }} --pyargs ${{ matrix.package }}
env:
PYSYN_CDBS: ${{ env.HOME }}/trds
CRDS_PATH: ${{ env.HOME }}/crds_cache
CRDS_SERVER_URL: ${{ matrix.CRDS_SERVER_URL }}
unit_tests_from_source:
name: run `${{ matrix.package }}` unit tests (Python ${{ matrix.python }}, ${{ matrix.os }}) from source
needs: [ build ]
Expand Down Expand Up @@ -160,6 +166,10 @@ jobs:
- package: stsynphot
repository: spacetelescope/stsynphot_refactor
dependencies: [ ci-watson, pytest-astropy ]
env:
PYSYN_CDBS: ${{ env.HOME }}/trds
CRDS_PATH: ${{ env.HOME }}/crds_cache
CRDS_SERVER_URL: ${{ matrix.CRDS_SERVER_URL }}
steps:
- uses: actions/checkout@v3.0.2
with:
Expand Down Expand Up @@ -199,11 +209,13 @@ jobs:
- run: cd ${{ matrix.package }} && conda install -y pytest pytest-xdist
- run: cd ${{ matrix.package }} && pip install ${{ join(matrix.dependencies, ' ') }}
if: matrix.dependencies != ''
- run: echo "CRDS_CONTEXT=$(crds list --operational-context)" >> $GITHUB_ENV
if: ${{ matrix.CRDS_SERVER_URL }} != ''
- uses: actions/cache@v3.0.5
with:
path: ${{ env.HOME }}/crds_cache
key: crds-${{ env.CRDS_CONTEXT }}
- run: cd ${{ matrix.package }} && pytest -n auto ${{ matrix.pytest_args }} ${{ matrix.test_directory }}
env:
PYSYN_CDBS: ${{ env.HOME }}/trds
CRDS_PATH: ${{ env.HOME }}/crds_cache
CRDS_SERVER_URL: ${{ matrix.CRDS_SERVER_URL }}
smoke_tests:
name: run `${{ matrix.package }}` smoke tests (Python ${{ matrix.python }}, ${{ matrix.os }})
needs: [ build ]
Expand All @@ -217,10 +229,17 @@ jobs:
include:
- package: calcos
run: calcos la8n01qkq_rawtag_a.fits
CRDS_SERVER_URL: https://hst-crds.stsci.edu
jref: hst/references/hst/
- package: drizzlepac
run: pytest -n auto tests/test_drizzlepac.py
CRDS_SERVER_URL: https://hst-crds.stsci.edu
jref: hst/references/hst/
env:
PYSYN_CDBS: ${{ env.HOME }}/trds
CRDS_PATH: ${{ env.HOME }}/crds_cache
CRDS_SERVER_URL: ${{ matrix.CRDS_SERVER_URL }}
jref: ${{ env.CRDS_PATH }}/${{ matrix.jref }}
steps:
- uses: actions/checkout@v3.0.2
with:
Expand Down Expand Up @@ -256,12 +275,13 @@ jobs:
path: 'tests/data/'
key: data-${{ hashFiles('tests/data/*') }}
- run: conda install -y pytest pytest-xdist
- run: echo "CRDS_CONTEXT=$(crds list --operational-context)" >> $GITHUB_ENV
if: ${{ matrix.CRDS_SERVER_URL }} != ''
- uses: actions/cache@v3.0.5
with:
path: ${{ env.HOME }}/crds_cache
key: crds-${{ env.CRDS_CONTEXT }}
- run: ${{ matrix.run }}
env:
PYSYN_CDBS: ${{ env.HOME }}/trds
CRDS_PATH: ${{ env.HOME }}/crds_cache
CRDS_SERVER_URL: https://hst-crds.stsci.edu
jref: ${{ env.CRDS_PATH }}/${{ matrix.jref }}
export:
name: export environment (Python ${{ matrix.python }}, ${{ matrix.os }})
needs: [ unit_tests, unit_tests_from_source, smoke_tests ]
Expand Down

0 comments on commit 1241887

Please sign in to comment.