|
22 | 22 | uses: actions/setup-python@v4 |
23 | 23 | with: |
24 | 24 | python-version: 3 |
25 | | - - name: Install pip |
26 | | - run: python -m pip install --upgrade pip |
27 | | - |
28 | | - - name: Install known good Ruff |
29 | | - run: python -m pip install ruff==0.0.284 |
30 | | - - name: Lint with known good Ruff |
31 | | - run: ruff . --diff --format github |
32 | | - |
33 | | - - name: Install latest Ruff |
34 | | - run: python -m pip install --upgrade ruff |
35 | | - - name: Lint with Ruff |
36 | | - continue-on-error: true |
37 | | - run: ruff . --diff --format github |
| 25 | + - uses: pre-commit/[email protected] |
| 26 | + with: |
| 27 | + extra_args: ruff --all-files |
38 | 28 |
|
39 | 29 | flake8: |
40 | 30 | runs-on: ubuntu-latest |
|
45 | 35 | uses: actions/setup-python@v4 |
46 | 36 | with: |
47 | 37 | python-version: 3 |
48 | | - - name: Install dependencies |
49 | | - run: | |
50 | | - python -m pip install --upgrade pip |
51 | | - python -m pip install --upgrade "flake8>=3.5.0" "flake8-simplify" |
52 | | - - name: Lint with flake8 |
53 | | - run: flake8 . |
| 38 | + - uses: pre-commit/[email protected] |
| 39 | + with: |
| 40 | + extra_args: flake8 --all-files |
54 | 41 |
|
55 | 42 | isort: |
56 | 43 | runs-on: ubuntu-latest |
|
61 | 48 | uses: actions/setup-python@v4 |
62 | 49 | with: |
63 | 50 | python-version: 3 |
64 | | - - name: Install dependencies |
65 | | - run: | |
66 | | - python -m pip install --upgrade pip |
67 | | - python -m pip install --upgrade isort |
68 | | - - name: Lint with isort |
69 | | - run: isort --check-only --diff . |
| 51 | + - uses: pre-commit/[email protected] |
| 52 | + with: |
| 53 | + extra_args: isort --all-files |
70 | 54 |
|
71 | 55 | mypy: |
72 | 56 | runs-on: ubuntu-latest |
|
77 | 61 | uses: actions/setup-python@v4 |
78 | 62 | with: |
79 | 63 | python-version: 3 |
80 | | - - name: Install dependencies |
81 | | - run: | |
82 | | - python -m pip install --upgrade pip |
83 | | - python -m pip install --upgrade "mypy>=0.990" docutils-stubs types-requests |
84 | | - - name: Type check with mypy |
85 | | - run: mypy sphinx/ |
| 64 | + - uses: pre-commit/[email protected] |
| 65 | + with: |
| 66 | + extra_args: mypy --all-files |
86 | 67 |
|
87 | 68 | docs-lint: |
88 | 69 | runs-on: ubuntu-latest |
|
93 | 74 | uses: actions/setup-python@v4 |
94 | 75 | with: |
95 | 76 | python-version: 3 |
96 | | - - name: Install dependencies |
97 | | - run: | |
98 | | - python -m pip install --upgrade pip |
99 | | - python -m pip install --upgrade sphinx-lint |
100 | | - - name: Lint documentation with sphinx-lint |
101 | | - run: > |
102 | | - sphinx-lint |
103 | | - --enable line-too-long |
104 | | - --max-line-length 85 |
105 | | - CHANGES |
106 | | - CONTRIBUTING.rst |
107 | | - README.rst |
108 | | - doc/ |
| 77 | + - uses: pre-commit/[email protected] |
| 78 | + with: |
| 79 | + extra_args: sphinx-lint --all-files |
109 | 80 |
|
110 | 81 | twine: |
111 | 82 | runs-on: ubuntu-latest |
|
0 commit comments