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