Extend ci workflow #328
Workflow file for this run
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: "Tests" | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- pyprobe/** | |
- tests/** | |
- docs/source/examples/*ipynb | |
- pyproject.toml | |
- .github/workflows/ci.yml | |
- uv.lock | |
push: | |
branches: | |
- main | |
paths: | |
- pyprobe/** | |
- tests/** | |
- pyproject.toml | |
- .github/workflows/ci.yml | |
- uv.lock | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.11", "3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv and set the python version | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: "0.6.3" | |
enable-cache: true | |
python-version: ${{ matrix.python-version }} | |
- name: Run tests with frozen dependencies | |
run: uv run --all-extras --frozen --isolated pytest --cov --cov-report=xml -n auto | |
- name: Upload coverage reports to Codecov | |
if: matrix.python-version == '3.12' | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Test notebooks | |
if: github.event_name == 'pull_request' | |
run: | | |
shopt -s extglob | |
uv run --all-extras --frozen --isolated pytest -n auto --nbmake docs/source/examples/!(comparing-pyprobe-performance).ipynb | |
- name: Test upgraded dependencies | |
run: uv run --extra dev --upgrade --isolated pytest -n auto | |