Merge pull request #210 from kammerje/AarynnCarter-patch-1 #567
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: [push, pull_request] | |
jobs: | |
tests: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: Check for Sphinx doc build errors | |
os: ubuntu-latest | |
python: '3.10' | |
toxenv: docbuild | |
- name: Try latest versions of all dependencies | |
os: ubuntu-latest | |
python: '3.11' | |
toxenv: py311-latest-test | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox tox-conda>=0.2 | |
pip install pytest | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Get WebbPSF Data | |
run: | # Get WebbPSF data files (just a subset of the full dataset!) and set up environment variable | |
wget https://stsci.box.com/shared/static/gkbnn3jwcootr9riwv0rv1t8rpvxl3vr.gz -O /tmp/minimal-webbpsf-data.tar.gz | |
tar -xzvf /tmp/minimal-webbpsf-data.tar.gz | |
echo "WEBBPSF_PATH=${{github.workspace}}/webbpsf-data" >> $GITHUB_ENV | |
- name: Set webbpsf_ext and CDBS Data Paths | |
run: | # Set up temporary data environment variables | |
echo "WEBBPSF_EXT_PATH=$(mktemp -d)" >> $GITHUB_ENV | |
echo "PYSYN_CDBS=$(mktemp -d)" >> $GITHUB_ENV | |
- name: Get SpaceKLIP test Data | |
if: ${{ contains(matrix.toxenv,'test') }} | |
run: | | |
wget https://stsci.box.com/shared/static/dq4y4r4e376922rw6fyu31pr68owrko7.zip -O /tmp/spaceklip_test_data.zip | |
unzip /tmp/spaceklip_test_data.zip | |
echo "SPACEKLIP_TEST_DATA_PATH=${{github.workspace}}/spaceklip_test_data" >> $GITHUB_ENV | |
- name: Check conda info | |
run: conda info | |
- name: Run tests via tox | |
if: ${{ contains(matrix.toxenv,'test') }} | |
run: | | |
tox -e ${{ matrix.toxenv }} | |
- name: Run docs tests via Tox | |
if: ${{ contains(matrix.toxenv,'docbuild') }} | |
run: | | |
cp $RUNNER_WORKSPACE/spaceKLIP/requirements.txt /tmp/ | |
tox -e ${{ matrix.toxenv }} | |