Skip to content

ci: bump docker/setup-qemu-action from 3.7.0 to 4.2.0 #6

ci: bump docker/setup-qemu-action from 3.7.0 to 4.2.0

ci: bump docker/setup-qemu-action from 3.7.0 to 4.2.0 #6

Workflow file for this run

name: CI
on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
# Least privilege by default: no job here needs to write anything back.
permissions:
contents: read
env:
# Fail the build if uv.lock no longer matches pyproject.toml, instead of
# silently re-resolving.
UV_FROZEN: "1"
jobs:
lint:
name: Lint, types and workflow audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
# Do not leave the job token behind in .git/config.
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Install the project
run: uv sync --dev
- name: Ruff (lint)
run: uv run ruff check --output-format=github .
- name: Ruff (format)
run: uv run ruff format --check --diff .
- name: Type check
run: uv run ty check
- name: Audit the workflows
run: uv run zizmor --format plain .github/workflows
test:
name: Tests py${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12", "3.13"]
exclude:
- os: macos-latest
python-version: "3.10"
- os: macos-latest
python-version: "3.11"
- os: windows-latest
python-version: "3.10"
- os: windows-latest
python-version: "3.11"
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
cache-dependency-glob: "pyproject.toml"
- name: Install the project
run: uv sync --dev
- name: Pytest
run: uv run pytest -m 'not integration' --cov --cov-report=xml --cov-report=term-missing
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: coverage
path: coverage.xml
build:
name: Build distributions
runs-on: ubuntu-latest
needs: [lint, test]
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
- name: Build sdist and wheel
run: uv build
- name: Check metadata
run: |
uv sync --dev
uv run twine check dist/*
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: dist
path: dist/