Skip to content

code-coverage: set fail_ci_if_error to true to avoid silent errors #599

code-coverage: set fail_ci_if_error to true to avoid silent errors

code-coverage: set fail_ci_if_error to true to avoid silent errors #599

Workflow file for this run

# linting - Github Actions
#
# Security references:
# - https://securitylab.github.com/resources/github-actions-preventing-pwn-requests
# - https://securitylab.github.com/resources/github-actions-untrusted-input
# - https://securitylab.github.com/resources/github-actions-building-blocks
# - https://securitylab.github.com/resources/github-actions-new-patterns-and-mitigations
#
# Used actions:
# - actions/checkout
# repo: https://github.com/actions/checkout
# releases: https://github.com/actions/checkout/tags
#
# - astral-sh/setup-uv: set up uv environment
# repo: https://github.com/astral-sh/setup-uv
# releases: https://github.com/astral-sh/setup-uv/tags
# https://docs.astral.sh/uv/guides/integration/github/
name: Linting
concurrency:
# see https://docs.github.com/en/actions/using-jobs/using-concurrency
# cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
env:
# Pin uv version for reproducible builds
# https://github.com/astral-sh/uv/releases
UV_VERSION: "0.9.19" # released on 29-12-2025
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
permissions:
contents: read
jobs:
# see https://docs.astral.sh/uv/guides/integration/github/
run-tests:
name: Python linters
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
# repo: https://github.com/actions/checkout
# releases: https://github.com/actions/checkout/tags
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 released on 02-12-2025
with:
persist-credentials: false
fetch-depth: 0
- name: Remove sitecustomize.py
run: |
sudo rm -f /usr/lib/python3.*/sitecustomize.py
sudo rm -f /etc/python3.*/sitecustomize.py
# repo: https://github.com/astral-sh/setup-uv
# releases: https://github.com/astral-sh/setup-uv/tags
# docs: https://docs.astral.sh/uv/guides/integration/github
- name: Install pinned version of uv
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6 released on 13-12-2025
with:
python-version: ${{ matrix.python-version }}
version: ${{ env.UV_VERSION }}
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install the project
run: uv sync --all-groups
- name: Pre-commit
run: uv run pre-commit run --all-files
# - name: Ruff check
# run: uv run ruff check src tests
# - name: Pylint
# run: uv run pylint src
- name: Pyroma
run: uv run pyroma .