Skip to content

fix: fewer warnings, default to sys.monitoring on 3.14+ #4547

fix: fewer warnings, default to sys.monitoring on 3.14+

fix: fewer warnings, default to sys.monitoring on 3.14+ #4547

Workflow file for this run

# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
name: "Quality"
on:
push:
branches:
- master
- nedbat/*
pull_request:
workflow_dispatch:
defaults:
run:
shell: bash
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
permissions:
contents: read
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
changed:
name: "Check changed files"
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
python: ${{ steps.filter.outputs.python }}
docs: ${{ steps.filter.outputs.docs }}
actions: ${{ steps.filter.outputs.actions }}
workflow: ${{ steps.filter.outputs.workflow }}
steps:
- name: "Check out the repo"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: "Examine changed files"
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
python:
- "**.py"
docs:
- "doc/**"
- "coverage/**.py"
actions:
- ".github/workflows/**"
workflow:
- ".github/workflows/quality.yml"
- "tox.ini"
- "requirements/*.pip"
lint:
name: "Pylint etc"
# Because pylint can report different things on different OS's (!)
# (https://github.com/PyCQA/pylint/issues/3489), run this on Mac where local
# pylint gets run.
# GitHub is rolling out macos 14, but it doesn't have Python 3.8 or 3.9.
# https://mastodon.social/@hugovk/112320493602782374
runs-on: macos-13
needs: changed
if: ${{ needs.changed.outputs.python == 'true' || needs.changed.outputs.actions == 'true' || needs.changed.outputs.workflow == 'true' }}
steps:
- name: "Check out the repo"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: "Install Python"
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.9" # Minimum of PYVERSIONS
cache: pip
cache-dependency-path: 'requirements/*.pip'
- name: "Install dependencies"
run: |
python -m pip install -r requirements/tox.pip
- name: "Tox lint"
run: |
python -m tox -e lint
mypy:
name: "Check types"
runs-on: ubuntu-latest
needs: changed
if: ${{ needs.changed.outputs.python == 'true' || needs.changed.outputs.workflow == 'true' }}
steps:
- name: "Check out the repo"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: "Install Python"
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.9" # Minimum of PYVERSIONS
cache: pip
cache-dependency-path: 'requirements/*.pip'
- name: "Install dependencies"
run: |
python -m pip install -r requirements/tox.pip
- name: "Tox mypy"
run: |
python -m tox -e mypy
doc:
name: "Build docs"
runs-on: ubuntu-latest
needs: changed
if: ${{ needs.changed.outputs.docs == 'true' || needs.changed.outputs.workflow == 'true' }}
steps:
- name: "Check out the repo"
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: "Install Python"
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: "3.11" # Doc version from PYVERSIONS
cache: pip
cache-dependency-path: 'requirements/*.pip'
- name: "Show environment"
run: |
set -xe
python -VV
python -m site
env | sort
- name: "Install dependencies"
run: |
set -xe
python -m pip install -r requirements/tox.pip
- name: "Tox doc"
run: |
python -m tox -e doc
zizmor:
name: "Zizmor GHA security check"
runs-on: ubuntu-latest
permissions:
contents: read
actions: read
needs: changed
if: ${{ needs.changed.outputs.actions == 'true' || needs.changed.outputs.workflow == 'true' }}
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install the latest version of uv
uses: astral-sh/setup-uv@f0ec1fc3b38f5e7cd731bb6ce540c5af426746bb #v6.1.0
with:
enable-cache: false
- name: Run zizmor
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: uvx zizmor --pedantic .github/workflows