add separate workflow to download CRDS test cache #853
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
## uncomment before merging to master once test suite is finalized | |
# push: | |
# branches: | |
# - master | |
# tags: | |
# - '*' | |
pull_request: | |
branches: | |
# - master | |
- pytest-migration #temp | |
env: | |
CRDS_CLIENT_RETRY_COUNT: 3 | |
CRDS_CLIENT_RETRY_DELAY_SECONDS: 20 | |
LD_LIBRARY_PATH: /usr/local/lib | |
jobs: | |
cache: | |
uses: ./.github/workflows/cache.yml | |
pytest: | |
name: ${{ matrix.runs-on }} Python ${{ matrix.python-version }} | |
needs: [ cache ] | |
runs-on: ${{ matrix.runs-on }} | |
env: | |
CRDS_TEST_ROOT: /tmp | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: | |
- ubuntu-latest | |
# - macos-latest # TEMP | |
python-version: | |
- 3.9 | |
- '3.10' | |
- 3.11 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install fitsverify | |
run: | | |
wget --quiet --output-document - http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio-3.49.tar.gz | tar -xz -C $HOME | |
cd $HOME/cfitsio-3.49 | |
./configure --prefix=/usr/local --enable-reentrant --disable-curl | |
make shared | |
sudo make install | |
wget --quiet --output-document - https://heasarc.gsfc.nasa.gov/docs/software/ftools/fitsverify/fitsverify-4.20.tar.gz | tar -xz -C $HOME | |
cd $HOME/fitsverify-4.20 | |
gcc -o fitsverify ftverify.c fvrf_data.c fvrf_file.c fvrf_head.c fvrf_key.c fvrf_misc.c -DSTANDALONE -lcfitsio | |
sudo cp fitsverify /usr/local/bin | |
- name: Install Python dependencies | |
run: | | |
pip install roman-datamodels git+https://github.com/spacetelescope/jwst | |
pip uninstall --yes crds | |
./install | |
pip install .[submission,test,docs,synphot] | |
- uses: actions/cache@v3 | |
if: always() | |
with: | |
path: ${{ needs.cache.outputs.path }} | |
key: ${{ needs.cache.outputs.key }} | |
- run: ./setup_test_cache ${{ env.CRDS_TEST_ROOT }} | |
- run: ./runtests --cover |