Skip to content

Commit 9a6855e

Browse files
committed
Split linting jobs into a separate workflow file
1 parent 483b82a commit 9a6855e

2 files changed

Lines changed: 45 additions & 38 deletions

File tree

.github/workflows/lint.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: lint
2+
3+
on: # zizmor: ignore[dangerous-triggers]
4+
workflow_run:
5+
workflows: [update-and-build]
6+
types: [completed]
7+
8+
permissions: {}
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
version: [3.15, 3.14, 3.13, 3.12, 3.11]
17+
continue-on-error: true
18+
steps:
19+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
20+
with:
21+
python-version: 3
22+
- run: pip install sphinx-lint
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
24+
with:
25+
ref: ${{ matrix.version }}
26+
persist-credentials: false
27+
- uses: rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0
28+
- run: sphinx-lint
29+
30+
lint-epub:
31+
runs-on: ubuntu-latest
32+
strategy:
33+
matrix:
34+
version: [3.15, 3.14]
35+
continue-on-error: true
36+
steps:
37+
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
38+
with:
39+
python-version: 3.x
40+
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
41+
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
42+
with:
43+
name: build-${{ matrix.version }}-epub
44+
- run: uvx epubcheck

.github/workflows/update-lint-and-build.yml renamed to .github/workflows/update-and-build.yml

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Translation and Linting Workflow
1+
name: update and build
22

33
on:
44
schedule:
@@ -71,26 +71,6 @@ jobs:
7171
branch: ${{ matrix.version }}
7272
github_token: ${{ secrets.GITHUB_TOKEN }}
7373

74-
lint:
75-
runs-on: ubuntu-latest
76-
strategy:
77-
fail-fast: false
78-
matrix:
79-
version: [3.15, 3.14, 3.13, 3.12, 3.11]
80-
needs: [update]
81-
continue-on-error: true
82-
steps:
83-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
84-
with:
85-
python-version: 3
86-
- run: pip install sphinx-lint
87-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
88-
with:
89-
ref: ${{ matrix.version }}
90-
persist-credentials: false
91-
- uses: rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0
92-
- run: sphinx-lint
93-
9474
build:
9575
runs-on: ubuntu-latest
9676
strategy:
@@ -145,20 +125,3 @@ jobs:
145125
with:
146126
name: build-${{ matrix.version }}-pdf
147127
path: .
148-
149-
lint-epub:
150-
runs-on: ubuntu-latest
151-
strategy:
152-
matrix:
153-
version: [3.15, 3.14]
154-
needs: [build]
155-
continue-on-error: true
156-
steps:
157-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
158-
with:
159-
python-version: 3.x
160-
- uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
161-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
162-
with:
163-
name: build-${{ matrix.version }}-epub
164-
- run: uvx epubcheck

0 commit comments

Comments
 (0)