-
Notifications
You must be signed in to change notification settings - Fork 15
39 lines (32 loc) · 1.07 KB
/
lint.yaml
File metadata and controls
39 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: "Lint"
# Run these these whenever ...
on:
pull_request: # ... a PR is opened / updated
merge_group: # ... the PR is added to the merge queue
push:
branches:
- main # ... when merging into the main branch
# cancel running jobs if theres a newer push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Python 3.11
uses: actions/setup-python@v6
with:
python-version: '3.11'
# Only restore (don't save) caches on PRs. New caches created from PRs won't be
# accessible from other PRs, see workflows/create-cache.yaml.
- uses: actions/cache/restore@v5
with:
path: ~/.cache/pre-commit
key: pre-commit_${{ env.pythonLocation }}_${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run lint via pre-commit
run: pre-commit run --all-files