File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Lint with Pre-commit
2+
3+ on :
4+ push :
5+ branches : [master, main]
6+ pull_request :
7+ branches : [master, main]
8+
9+ jobs :
10+ pre-commit :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ pull-requests : write
15+
16+ steps :
17+ - uses : actions/checkout@v5
18+
19+ - name : Install uv
20+ uses : astral-sh/setup-uv@v6
21+ with :
22+ enable-cache : true
23+
24+ - name : Set up Python
25+ run : uv python install
26+
27+ - name : Install the project
28+ run : uv sync --locked --all-extras --dev
29+
30+ - name : Run pre-commit (all files on push, only changes on PR)
31+ run : |
32+ if [ "${{ github.event_name }}" = "push" ]; then
33+ uv run pre-commit run --all-files --show-diff-on-failure --color always
34+ else
35+ uv run pre-commit run --from-ref origin/${{ github.base_ref }} --to-ref HEAD --show-diff-on-failure --color always
36+ fi
Original file line number Diff line number Diff line change @@ -140,3 +140,4 @@ dmypy.json
140140
141141# Cython debug symbols
142142cython_debug /
143+ /.secrets
You can’t perform that action at this time.
0 commit comments