[pre-commit.ci] pre-commit autoupdate #41
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: Test Python package | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
UV_SYSTEM_PYTHON: 1 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read # for private repos | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
cache-dependency-glob: | | |
**/requirements*.txt | |
**/pyproject.toml | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Install dependencies | |
run: uv pip install nox[uv] | |
- name: Test with pytest | |
run: nox -db uv | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }} |