Use real TOML loader for .toml configs (fix Harrison PR #12 review) #204
Workflow file for this run
This file contains hidden or 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: Aragog CI Test Suite | |
| on: | |
| push: | |
| pull_request: | |
| branches: | |
| - main | |
| types: | |
| - opened | |
| - reopened | |
| - synchronize | |
| - ready_for_review | |
| workflow_dispatch: | |
| # Push and PR CI: unit tests only, on ubuntu + macos x py 3.11/3.12/3.13. | |
| # Targets <5 min wall. Slow tests (full multi-Myr CVODE solves) live in | |
| # the scheduled nightly workflow `nightly.yml` instead, alongside coverage | |
| # enforcement against the 85% floor. Running the slow suite or coverage | |
| # instrumentation on every push burns ~10 min CI time per commit and gives | |
| # no bug-finding signal that the unit suite doesn't already cover. | |
| # | |
| # Uses micromamba + conda-forge for the env so SUNDIALS, gfortran, and the | |
| # scikits-odes binary stack come prebuilt instead of being compiled from | |
| # source against stock apt/brew (which lag the SUNDIALS major version | |
| # scikits-odes-sundials 3.x requires). | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-fast: | |
| name: Aragog-check (${{ matrix.os }}, py${{ matrix.python-version }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| python-version: ["3.11", "3.12", "3.13"] | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -el {0} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up conda env (sundials from conda-forge) | |
| uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| environment-name: aragog-test | |
| create-args: >- | |
| python=${{ matrix.python-version }} | |
| sundials | |
| condarc: | | |
| channels: | |
| - conda-forge | |
| - name: Install pip-only test deps (scikits-odes-sundials builds against conda SUNDIALS) | |
| run: | | |
| pip install pytest pytest-xdist pytest-dependency ruff | |
| # Install scikits-odes-sundials directly (skip the scikits-odes | |
| # metapackage). This avoids scikits-odes-daepack, which is a | |
| # transitive Fortran dep with f2py incompatibility with numpy | |
| # 2.3+ and needs gfortran on macOS. aragog imports CVODE | |
| # directly from scikits_odes_sundials.cvode and has no use for | |
| # the DAE solvers in the metapackage. | |
| pip install scikits-odes-sundials jax equinox | |
| - name: Install aragog | |
| run: | | |
| pip install -e . | |
| - name: Fetch SPIDER EOS test data | |
| run: | | |
| mkdir -p /tmp/aragog-test-data | |
| curl -sL -o /tmp/spider_eos.tar.gz \ | |
| https://github.com/FormingWorlds/aragog/releases/download/test-data-v1/spider_eos_test_data.tar.gz | |
| tar xzf /tmp/spider_eos.tar.gz -C /tmp/aragog-test-data/ | |
| echo "ARAGOG_TEST_EOS_DIR=/tmp/aragog-test-data/spider_eos" >> $GITHUB_ENV | |
| - name: Lint with Ruff | |
| run: | | |
| ruff check src/ tests/ | |
| ruff format --check src/ tests/ | |
| - name: Run unit tests | |
| run: | | |
| pytest -m "unit and not slow" -n auto -o "addopts=" \ | |
| -o "junit_family=legacy" --junitxml=junit.xml | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: FormingWorlds/Aragog | |
| files: junit.xml |