Skip to content

Merge pull request #698 from pyinat/fix-pprint #1792

Merge pull request #698 from pyinat/fix-pprint

Merge pull request #698 from pyinat/fix-pprint #1792

Workflow file for this run

name: Build
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
workflow_dispatch:
env:
LATEST_PY_VERSION: '3.14'
PYTEST_VERBOSE: 'true'
jobs:
# Run unit tests for each supported python version
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.15', '3.14', '3.13', '3.12', '3.11', '3.10']
steps:
# Install dependencies, with caching
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: uv.lock
- name: Install dependencies
run: |
uv python install ${{ matrix.python-version }}
uv sync
# Run tests with coverage report
- name: Run tests
run: uv run nox -e cov -- xml
# Latest python version: send coverage report to codecov
- name: Upload coverage report to Codecov
if: ${{ matrix.python-version == env.LATEST_PY_VERSION }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
fail_ci_if_error: true
# Run code analysis steps via pre-commit hooks
analyze:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: ${{ env.LATEST_PY_VERSION }}
- name: Run style checks & linting
uses: j178/prek-action@v1
# Dependency scan
- name: Scan dependencies for known vulnerabilities
uses: pypa/gh-action-pip-audit@v1.1.0
with:
vulnerability-service: osv
# Ignore issues with pip and setuptools versions used by the action itself
ignore-vulns: |
GHSA-4xh5-x5gv-qwph
CVE-2026-1703
# Summarize any dependency changes
# TODO: Does not appear to be working with this repo
# - name: uv lock report
# uses: mw-root/uv-lock-report@v0.7.0
# with:
# output-format: table
# github-token: ${{ secrets.GITHUB_TOKEN }}