Skip to content
This repository was archived by the owner on Jul 1, 2026. It is now read-only.

Bump actions/checkout from 6.0.0 to 6.0.2 #374

Bump actions/checkout from 6.0.0 to 6.0.2

Bump actions/checkout from 6.0.0 to 6.0.2 #374

Workflow file for this run

name: Python checks
on:
push:
branches:
- main
pull_request:
schedule:
- cron: 0 0 * * 1
workflow_dispatch:
permissions: read-all
jobs:
pytest:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version:
- '3.11'
- '3.12'
- '3.13'
- '3.14'
os:
- ubuntu-latest
- windows-latest
- macos-latest
resolution:
- highest
permissions:
contents: write
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: ${{ matrix.python-version }}
cache: pip
- uses: install-pinned/uv@87c2872ebb798b99a5ada5669f99ec2680716ae5
- run: |
uv pip install --system --resolution ${{ matrix.resolution }} -e .[dev]
- run: |
patchright install chrome
- id: cache-pytest
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: .pytest_cache
key: pytest-${{ matrix.python-version }}-${{ matrix.os }}-${{ matrix.resolution }}-${{ hashFiles('pyproject.toml') }}
- run: pytest
env:
COVERAGE_FILE: ".coverage.${{ matrix.os }}.${{ matrix.python-version }}.${{ matrix.resolution }}"
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
with:
name: coverage-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.resolution }}
path: .coverage.${{ matrix.os }}.${{ matrix.python-version }}.${{ matrix.resolution }}
include-hidden-files: true
ruff-format:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
pypi.org:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: 3.13
cache: pip
- uses: install-pinned/uv@87c2872ebb798b99a5ada5669f99ec2680716ae5
- run: uv pip install --system .[dev]
- id: cache-ruff
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: .ruff_cache
key: ruff-${{ hashFiles('pyproject.toml') }}
- id: run-ruff
run: ruff format --diff .
ruff-check:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
files.pythonhosted.org:443
github.com:443
pypi.org:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: 3.13
cache: pip
- uses: install-pinned/uv@87c2872ebb798b99a5ada5669f99ec2680716ae5
- run: uv pip install --system .[dev]
- id: cache-ruff
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: .ruff_cache
key: ruff-${{ hashFiles('pyproject.toml') }}
- id: run-ruff-sarif
run: |
ruff check --output-format=sarif -o results.sarif .
- uses: github/codeql-action/upload-sarif@fe4161a26a8629af62121b670040955b330f9af2
if: ( success() || failure() ) && contains('["success", "failure"]', steps.run-ruff-sarif.outcome)
with:
sarif_file: results.sarif
- id: run-ruff
if: failure() && contains('["failure"]', steps.run-ruff-sarif.outcome)
run: |
ruff check --output-format=github .
bandit:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
files.pythonhosted.org:443
github.com:443
pypi.org:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: 3.13
cache: pip
- uses: install-pinned/uv@87c2872ebb798b99a5ada5669f99ec2680716ae5
- run: uv pip install --system .[dev]
- id: run-bandit-sarif
run: |
bandit --confidence-level 'medium' --severity-level 'medium' --recursive 'src' --format 'sarif' --output 'results.sarif'
- uses: github/codeql-action/upload-sarif@fe4161a26a8629af62121b670040955b330f9af2
if: ( success() || failure() ) && contains('["success", "failure"]', steps.run-bandit-sarif.outcome)
with:
sarif_file: results.sarif
- id: run-bandit
if: failure() && contains('["failure"]', steps.run-bandit-sarif.outcome)
run: |
bandit --confidence-level 'medium' --severity-level 'medium' --recursive 'src'
mypy:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
pypi.org:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: '3.13'
cache: pip
- uses: install-pinned/uv@87c2872ebb798b99a5ada5669f99ec2680716ae5
- run: uv pip install --system -e .[dev]
- id: cache-mypy
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: .mypy_cache
key: ${{ runner.os }}-mypy-${{ hashFiles('pyproject.toml') }}
- run: mypy .
coverage:
runs-on: ubuntu-latest
needs: pytest
permissions:
pull-requests: write
contents: write
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
github.com:443
img.shields.io:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
pattern: coverage-*
merge-multiple: true
- id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@e623398c19eb3853a5572d4a516e10b15b5cefbc
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_COVERAGE_FILES: true
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt
pre-commit:
runs-on: ubuntu-latest
needs:
- ruff-format
- ruff-check
- bandit
permissions:
contents: write
steps:
- uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
files.pythonhosted.org:443
github.com:443
proxy.golang.org:443
pypi.org:443
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548
with:
python-version: 3.13
cache: pip
- uses: install-pinned/uv@87c2872ebb798b99a5ada5669f99ec2680716ae5
- run: uv pip install --system .[dev]
- id: cache-pre-commit
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: .pre-commit-cache
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}-${{ hashFiles('pyproject.toml') }}
- run: |
pre-commit install
pre-commit run --all-files
env:
PRE_COMMIT_HOME: .pre-commit-cache