Skip to content

Commit bc8f7f2

Browse files
committed
Consolidate quality jobs
Signed-off-by: Samuel Monson <[email protected]>
1 parent 4ef9b00 commit bc8f7f2

File tree

4 files changed

+131
-210
lines changed

4 files changed

+131
-210
lines changed

.github/workflows/development.yml

Lines changed: 7 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -17,117 +17,19 @@ jobs:
1717
ui-tests:
1818
uses: ./.github/workflows/testing-ui.yml
1919

20-
quality-checks:
21-
runs-on: ubuntu-latest
22-
strategy:
23-
matrix:
24-
python: ["3.10", "3.13"]
25-
steps:
26-
- uses: actions/checkout@v4
27-
- name: Set up Python
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version: ${{ matrix.python }}
31-
- name: Install dependencies
32-
run: |
33-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
34-
pip install tox tox-pdm
35-
- name: Run quality checks
36-
run: tox -e quality
37-
38-
ui-quality-checks:
39-
permissions:
40-
contents: "read"
41-
runs-on: ubuntu-latest
42-
steps:
43-
- name: Check out code
44-
uses: actions/checkout@v4
45-
46-
- name: Set up Node.js 22
47-
uses: actions/setup-node@v4
48-
with:
49-
node-version: '22'
50-
51-
- name: Install dependencies
52-
run: npm ci
53-
54-
- name: Run quality and typing checks
55-
run: npm run lint
56-
57-
type-checks:
58-
runs-on: ubuntu-latest
20+
quality:
5921
strategy:
6022
matrix:
6123
python: ["3.10", "3.13"]
62-
steps:
63-
- uses: actions/checkout@v4
64-
- name: Set up Python
65-
uses: actions/setup-python@v5
66-
with:
67-
python-version: ${{ matrix.python }}
68-
- name: Install dependencies
69-
run: |
70-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
71-
pip install tox tox-pdm
72-
- name: Run quality checks
73-
run: tox -e types
74-
75-
ui-type-checks:
76-
permissions:
77-
contents: "read"
78-
runs-on: ubuntu-latest
79-
steps:
80-
- name: Check out code
81-
uses: actions/checkout@v4
82-
83-
- name: Set up Node.js 22
84-
uses: actions/setup-node@v4
85-
with:
86-
node-version: '22'
87-
88-
- name: Install dependencies
89-
run: npm ci
90-
91-
- name: Run quality and typing checks
92-
run: npm run type-check
93-
94-
precommit-checks:
95-
runs-on: ubuntu-latest
96-
strategy:
97-
matrix:
98-
python: ["3.10"]
99-
steps:
100-
- uses: actions/checkout@v4
101-
- name: Set up Python
102-
uses: actions/setup-python@v5
103-
with:
104-
python-version: ${{ matrix.python }}
105-
- name: Install dependencies
106-
run: pip install pre-commit
107-
- name: Run pre-commit checks
108-
run: SKIP=ruff-format pre-commit run --all-files
109-
110-
ui-precommit-checks:
111-
permissions:
112-
contents: "read"
113-
runs-on: ubuntu-latest
114-
steps:
115-
- name: Check out code
116-
uses: actions/checkout@v4
117-
118-
- name: Set up Node.js 22
119-
uses: actions/setup-node@v4
120-
with:
121-
node-version: '22'
122-
123-
- name: Install dependencies
124-
run: npm ci
24+
uses: ./.github/workflows/quality.yml
25+
with:
26+
python: ${{ matrix.python }}
12527

126-
- name: Run pre-commit checks
127-
run: npx husky run pre-commit
28+
ui-quality:
29+
uses: ./.github/workflows/ui-quality.yml
12830

12931
ui-pr-preview:
130-
needs: [ui-quality-checks, ui-precommit-checks, ui-tests]
32+
needs: [ui-quality, ui-tests]
13133
permissions:
13234
contents: write
13335
pull-requests: write

.github/workflows/main.yml

Lines changed: 7 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -17,117 +17,19 @@ jobs:
1717
ui-tests:
1818
uses: ./.github/workflows/testing-ui.yml
1919

20-
quality-checks:
21-
runs-on: ubuntu-latest
22-
strategy:
23-
matrix:
24-
python: ["3.10", "3.11", "3.12", "3.13"]
25-
steps:
26-
- uses: actions/checkout@v4
27-
- name: Set up Python
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version: ${{ matrix.python }}
31-
- name: Install dependencies
32-
run: |
33-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
34-
pip install tox tox-pdm
35-
- name: Run quality checks
36-
run: tox -e quality
37-
38-
ui-quality-checks:
39-
permissions:
40-
contents: "read"
41-
runs-on: ubuntu-latest
42-
steps:
43-
- name: Check out code
44-
uses: actions/checkout@v3
45-
46-
- name: Set up Node.js 22
47-
uses: actions/setup-node@v4
48-
with:
49-
node-version: '22'
50-
51-
- name: Install dependencies
52-
run: npm ci
53-
54-
- name: Run quality and typing checks
55-
run: npm run lint
56-
57-
type-checks:
58-
runs-on: ubuntu-latest
20+
quality:
5921
strategy:
6022
matrix:
6123
python: ["3.10", "3.11", "3.12", "3.13"]
62-
steps:
63-
- uses: actions/checkout@v4
64-
- name: Set up Python
65-
uses: actions/setup-python@v5
66-
with:
67-
python-version: ${{ matrix.python }}
68-
- name: Install dependencies
69-
run: |
70-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
71-
pip install tox tox-pdm
72-
- name: Run quality checks
73-
run: tox -e types
74-
75-
ui-type-checks:
76-
permissions:
77-
contents: "read"
78-
runs-on: ubuntu-latest
79-
steps:
80-
- name: Check out code
81-
uses: actions/checkout@v3
82-
83-
- name: Set up Node.js 22
84-
uses: actions/setup-node@v4
85-
with:
86-
node-version: '22'
87-
88-
- name: Install dependencies
89-
run: npm ci
90-
91-
- name: Run quality and typing checks
92-
run: npm run type-check
93-
94-
precommit-checks:
95-
runs-on: ubuntu-latest
96-
strategy:
97-
matrix:
98-
python: ["3.10"]
99-
steps:
100-
- uses: actions/checkout@v4
101-
- name: Set up Python
102-
uses: actions/setup-python@v5
103-
with:
104-
python-version: ${{ matrix.python }}
105-
- name: Install dependencies
106-
run: pip install pre-commit
107-
- name: Run pre-commit checks
108-
run: SKIP=ruff-format pre-commit run --all-files
109-
110-
ui-precommit-checks:
111-
permissions:
112-
contents: "read"
113-
runs-on: ubuntu-latest
114-
steps:
115-
- name: Check out code
116-
uses: actions/checkout@v3
117-
118-
- name: Set up Node.js 22
119-
uses: actions/setup-node@v4
120-
with:
121-
node-version: '22'
122-
123-
- name: Install dependencies
124-
run: npm ci
24+
uses: ./.github/workflows/quality.yml
25+
with:
26+
python: ${{ matrix.python }}
12527

126-
- name: Run pre-commit checks
127-
run: npx husky run pre-commit
28+
ui-quality:
29+
uses: ./.github/workflows/ui-quality.yml
12830

12931
deploy-ui-build:
130-
needs: [ui-quality-checks, ui-precommit-checks, ui-tests]
32+
needs: [ui-quality, ui-tests]
13133
permissions:
13234
contents: write
13335
runs-on: ubuntu-latest

.github/workflows/quality.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Quality Checks
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
python:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
quality-checks:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: ${{ inputs.python }}
19+
- name: Install dependencies
20+
run: |
21+
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
22+
pip install tox tox-pdm
23+
- name: Run quality checks
24+
run: tox -e quality
25+
26+
type-checks:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Set up Python
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ inputs.python }}
34+
- name: Install dependencies
35+
run: |
36+
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
37+
pip install tox tox-pdm
38+
- name: Run quality checks
39+
run: tox -e types
40+
41+
precommit-checks:
42+
runs-on: ubuntu-latest
43+
strategy:
44+
matrix:
45+
python: ["3.10"]
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Set up Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ matrix.python }}
52+
- name: Install dependencies
53+
run: pip install pre-commit
54+
- name: Run pre-commit checks
55+
run: SKIP=ruff-format pre-commit run --all-files

.github/workflows/ui-quality.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: UI Quality Checks
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
ui-quality-checks:
8+
permissions:
9+
contents: "read"
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Node.js 22
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '22'
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Run quality and typing checks
24+
run: npm run lint
25+
26+
ui-type-checks:
27+
permissions:
28+
contents: "read"
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Check out code
32+
uses: actions/checkout@v4
33+
34+
- name: Set up Node.js 22
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: '22'
38+
39+
- name: Install dependencies
40+
run: npm ci
41+
42+
- name: Run quality and typing checks
43+
run: npm run type-check
44+
45+
ui-precommit-checks:
46+
permissions:
47+
contents: "read"
48+
runs-on: ubuntu-latest
49+
steps:
50+
- name: Check out code
51+
uses: actions/checkout@v4
52+
53+
- name: Set up Node.js 22
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: '22'
57+
58+
- name: Install dependencies
59+
run: npm ci
60+
61+
- name: Run pre-commit checks
62+
run: npx husky run pre-commit

0 commit comments

Comments
 (0)