Continuous integration #5
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: Continuous integration | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Run pre-commit hooks | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files --config pre-commit.yml | |
pytest: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.9", "3.11"] | |
numpy: ["1.26"] | |
jax: ["0.4.14", "0.4.28"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
pip install pytest | |
pip install numpy==${{ matrix.numpy }} | |
pip install jax[cpu]==${{ matrix.jax }} | |
pip install . | |
- name: Run tests | |
run: pytest tests | |
doctest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
pip install pytest | |
pip install jax[cpu]==0.4.28 | |
pip install . | |
- name: Run doctests | |
run: pytest inox --doctest-modules |