CI #2792
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 | |
# trigger | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
# run Monday and Thursday at 03:42 UTC | |
- cron: '42 3 * * MON,THU' | |
# jobs | |
jobs: | |
base: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# update to 3.11 when numba allows (needed in umap) | |
python-version: ['3.9', '3.10'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-base | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh amici | |
- name: Run tests | |
timeout-minutes: 25 | |
run: tox -e base | |
- name: Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
petab: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.11'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-petab | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh amici pysb | |
- name: Run tests | |
timeout-minutes: 35 | |
run: tox -e petab | |
- name: Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
julia: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.11'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install julia | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: 1.7 | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache | |
~/.julia/artifacts | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-julia | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh | |
- name: Run tests | |
timeout-minutes: 20 | |
run: tox -e julia | |
- name: Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
optimize: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# update to 3.11 when nlopt allows | |
python-version: ['3.9', '3.10'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-optimize | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh ipopt | |
- name: Run tests | |
timeout-minutes: 20 | |
run: tox -e optimize | |
- name: Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
hierarchical: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.11'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-hierarchical | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh amici | |
- name: Run tests | |
timeout-minutes: 20 | |
run: tox -e hierarchical | |
- name: Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
select: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.11'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-select | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh amici | |
- name: Run tests | |
timeout-minutes: 20 | |
run: tox -e select | |
- name: Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
quality: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.11'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-quality | |
- name: Install dependencies | |
run: pip install tox pre-commit | |
- name: Check repository size | |
run: tox -e size | |
- name: Run quality checks | |
timeout-minutes: 5 | |
run: tox -e project,flake8 | |
- name: Run pre-commit hooks | |
run: pre-commit run --all-files | |
docs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.11'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-docs | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh doc amici | |
- name: Validate CITATION.cff | |
run: pip install cffconvert && cffconvert --validate | |
- name: Build doc | |
timeout-minutes: 10 | |
run: tox -e doc | |
notebooks1: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-notebooks1 | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh amici ipopt | |
- name: Run notebooks 1 | |
timeout-minutes: 20 | |
run: tox -e notebooks1 | |
notebooks2: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9'] | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Prepare python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: ${{ runner.os }}-${{ matrix.python-version }}-ci-notebooks2 | |
- name: Install dependencies | |
run: .github/workflows/install_deps.sh amici | |
- name: Run notebooks 2 | |
timeout-minutes: 20 | |
run: tox -e notebooks2 |