[MNT] Bump codecov/codecov-action from 4 to 5 in the github-actions group #46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR pre-commit | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- uses: tj-actions/changed-files@v45 | |
id: changed-files | |
- name: List changed files | |
run: echo '${{ steps.changed-files.outputs.all_changed_files }}' | |
# only check the full repository if PR and correctly labelled | |
- if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full pre-commit') }} | |
name: Full pre-commit | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files | |
- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'full pre-commit') }} | |
name: Local pre-commit | |
uses: pre-commit/[email protected] | |
with: | |
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }} |