Refactor test_analytical_gradient function to use parameterization #1724
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 tests | |
on: | |
pull_request: | |
jobs: | |
run_tests: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup miniconda | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
miniforge-variant: Mambaforge | |
mamba-version: "*" | |
channels: conda-forge,defaults | |
channel-priority: true | |
- name: install pymc and poetry | |
run: | | |
mamba info | |
mamba install -c conda-forge pymc poetry | |
- name: install hssm | |
run: | | |
poetry export --with dev --without-hashes --output=req.txt | |
grep -v -E '^jax\[cuda12\]|^nvidia|^jax\-cuda12' req.txt >> requirements.txt | |
pip install -r requirements.txt | |
pip install -e . | |
- name: Run mypy | |
run: mypy src/hssm | |
- name: Check formatting | |
run: ruff format --check . | |
- name: Linting | |
run: ruff check src/hssm | |
- name: Run fast tests | |
run: pytest -n auto -s --ignore=tests/slow | |
- name: Run slow tests | |
run: pytest -n auto -s tests/slow | |
- name: build docs | |
run: mkdocs build |