Repository navigation
v1 lint: placeholders must only be used in their own observable #4323
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| merge_group: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: '48 4 * * *' | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| platform: [windows-latest, macos-latest, ubuntu-latest] | |
| python-version: ["3.12", "3.14"] | |
| runs-on: ${{ matrix.platform }} | |
| env: | |
| # Coverage is only uploaded from one job. Elsewhere, it would only slow | |
| # down the tests (substantially on Python < 3.14). | |
| COVERAGE_ARGS: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.14' && '--cov=petab --cov-report=xml' || '' }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Install uv and python ${{ matrix.python-version }} | |
| uses: astral-sh/setup-uv@v10.0.1 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| - name: Quality tests | |
| run: uvx pre-commit run --all-files | |
| if: matrix.platform == 'ubuntu-latest' | |
| - name: Fetch BNGL test corpus | |
| run: uv run --no-project python -P tests/v1/fetch_bngl_corpus.py | |
| - name: Unit tests | |
| run: | | |
| uv sync --no-default-groups --group test | |
| uv pip list | |
| uv run pytest ${{ env.COVERAGE_ARGS }} --durations=10 tests | |
| - name: Coverage | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: ./coverage.xml | |
| if: env.COVERAGE_ARGS != '' | |
| doc: | |
| # Read the Docs covers PRs. Skipped jobs count as passing, so this can | |
| # be a required check. | |
| if: >- | |
| github.event_name == 'merge_group' | |
| || github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v7 | |
| - name: Install uv and python | |
| uses: astral-sh/setup-uv@v10.0.1 | |
| with: | |
| enable-cache: true | |
| python-version: "3.12" | |
| - name: Build documentation | |
| run: | | |
| uv sync --no-default-groups --group doc | |
| uv run --no-sync make -C doc html |