Skip to content

Feature/#53 trusted publishing #250

Feature/#53 trusted publishing

Feature/#53 trusted publishing #250

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches:
- '**'
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix: { python-version: ["3.9","3.10","3.11","3.12", "3.13"] }
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04 # v6.0.0; prevent CWE-829
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Run unit tests
run: uv run nox --python ${{ matrix.python-version }} -s tests-${{ matrix.python-version }} # Run the specific test session
- name: Run documentation tests
run: uv run nox -s doctest
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
with:
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
if: ${{ matrix.python-version == '3.12' }}
lint_and_docs:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@c7f87aa956e4c323abf06d5dec078e358f6b4d04 # v6.0.0; prevent CWE-829
with:
enable-cache: true
python-version: 3.12
- name: Lint via nox
run: uv run nox -s lint_critical lint_style
- name: Build docs
run: uv run nox -s docs
continue-on-error: true