Run test suite #138
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: Run test suite | |
on: | |
push: | |
schedule: | |
# Keep caches alive by accessing more than once a week | |
- cron: '12 5 * * 0,3' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.9", "3.10"] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Update pip/setuptools | |
run: python -m pip install --upgrade pip setuptools wheel | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
# This path is specific to Ubuntu | |
path: ~/.cache/pip | |
# Look to see if there is a cache hit for the corresponding setup.py file | |
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- name: Install doodads | |
run: | | |
pip install -e . | |
- name: Cache doodads raw data | |
uses: actions/cache@v2 | |
with: | |
# Raw data for REMOTE_RESOURCES | |
path: ~/.local/share/doodads/data/downloads | |
# Downloaded data can be safely cached even if URLs change (thanks | |
# to hashing in utils.py), but increment here if needed to invalidate | |
key: ${{ runner.os }}-doodads-data-downloads-v001 | |
- name: Cache doodads reference data | |
uses: actions/cache@v2 | |
with: | |
# Only the generated files should be saved, not the (larger) pre-conversion ones | |
path: ~/.local/share/doodads/data/generated | |
# If anything that loads or saves reference files changed, rerun | |
key: ${{ runner.os }}-doodads-data-generated-${{ hashFiles('doodads/ref/**.py') }} | |
- name: Get and convert reference data | |
run: | | |
ddx get_reference_data -v exclude=doodads.ref.settl_cond | |
- name: Run tests | |
run: | | |
pytest | |
- name: Generate sanity check plots | |
run: | | |
ddx run_diagnostics |