Skip to content

[MNT] Bump the python-packages group across 1 directory with 4 updates #10683

[MNT] Bump the python-packages group across 1 directory with 4 updates

[MNT] Bump the python-packages group across 1 directory with 4 updates #10683

Workflow file for this run

name: PR pre-commit
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
- labeled
- unlabeled
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pre-commit:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Setup Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Get changed files
if: ${{ github.event_name == 'pull_request' }}
uses: tj-actions/changed-files@2f7246cb26e8bb6709b6cbfc1fec7febfe82e96a # v47.0.5
id: changed-files
- name: List changed files
if: ${{ github.event_name == 'pull_request' }}
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
# Check the full repository on pushes to main
- name: Full pre-commit
if: ${{ github.event_name == 'push' }}
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
# Check the full repository on PRs that are explicitly labelled
- name: Full pre-commit on labelled PR
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full pre-commit') }}
uses: pre-commit/action@v3.0.1
with:
extra_args: --all-files
# Otherwise only check changed files on PRs
- name: Local pre-commit
if: ${{ github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'full pre-commit') }}
uses: pre-commit/action@v3.0.1
with:
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}
codespell-annotations:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2