File tree Expand file tree Collapse file tree 2 files changed +72
-21
lines changed
Expand file tree Collapse file tree 2 files changed +72
-21
lines changed Original file line number Diff line number Diff line change 1616 FORCE_COLOR : " 1"
1717
1818jobs :
19- # We only need to lint once, not for _each_ python version
20- lint :
21- runs-on : ubuntu-latest
22-
23- steps :
24- - uses : actions/checkout@v4
25- - name : Set up Python
26- uses : actions/setup-python@v5
27- with :
28- python-version : " 3"
29- - name : Install pip
30- run : python -m pip install --upgrade pip
31-
32- - name : Install pre-commit
33- run : pip install pre-commit
34-
35- - name : Lint
36- run : |
37- pre-commit run --all-files -v --show-diff-on-failure
38- pre-commit gc
39-
4019 test :
4120 runs-on : ubuntu-latest
4221
Original file line number Diff line number Diff line change 1+ name : Lint source code
2+
3+ on :
4+ push :
5+ pull_request :
6+ workflow_dispatch :
7+
8+ permissions :
9+ contents : read
10+
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+ cancel-in-progress : true
14+
15+ env :
16+ FORCE_COLOR : " 1"
17+
18+ jobs :
19+ ruff :
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+ - uses : actions/checkout@v4
24+ - name : Set up Python
25+ uses : actions/setup-python@v5
26+ with :
27+ python-version : " 3"
28+ - name : Install pip
29+ run : python -m pip install --upgrade pip
30+
31+ - name : Install Ruff
32+ run : python -m pip install "ruff==0.5.2"
33+
34+ - name : Lint with Ruff
35+ run : ruff check . --output-format github
36+
37+ - name : Format with Ruff
38+ run : ruff format . --diff
39+
40+ mypy :
41+ runs-on : ubuntu-latest
42+
43+ steps :
44+ - uses : actions/checkout@v4
45+ - name : Set up Python
46+ uses : actions/setup-python@v5
47+ with :
48+ python-version : " 3"
49+ - name : Install dependencies
50+ run : |
51+ python -m pip install --upgrade pip
52+ python -m pip install ".[lint,test]"
53+ - name : Type check with mypy
54+ run : mypy
55+
56+ twine :
57+ runs-on : ubuntu-latest
58+
59+ steps :
60+ - uses : actions/checkout@v4
61+ - name : Set up Python
62+ uses : actions/setup-python@v5
63+ with :
64+ python-version : " 3"
65+ - name : Install dependencies
66+ run : |
67+ python -m pip install --upgrade pip
68+ python -m pip install --upgrade twine build
69+ - name : Lint with twine
70+ run : |
71+ python -m build .
72+ twine check dist/*
You can’t perform that action at this time.
0 commit comments