Skip to content

Commit 105218b

Browse files
committed
Consolidate test jobs
Signed-off-by: Samuel Monson <[email protected]>
1 parent 4099c2e commit 105218b

File tree

4 files changed

+44
-435
lines changed

4 files changed

+44
-435
lines changed

.github/workflows/development.yml

Lines changed: 13 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ on:
55
types: [opened, synchronize, reopened]
66

77
jobs:
8+
tests:
9+
strategy:
10+
matrix:
11+
python: ["3.10", "3.13"]
12+
uses: ./.github/workflows/testing.yml
13+
with:
14+
python: ${{ matrix.python }}
15+
args: -m "smoke or sanity"
16+
17+
ui-tests:
18+
uses: ./.github/workflows/testing-ui.yml
19+
820
quality-checks:
921
runs-on: ubuntu-latest
1022
strategy:
@@ -114,82 +126,8 @@ jobs:
114126
- name: Run pre-commit checks
115127
run: npx husky run pre-commit
116128

117-
unit-tests:
118-
runs-on: ubuntu-latest
119-
strategy:
120-
matrix:
121-
python: ["3.10", "3.13"]
122-
steps:
123-
- uses: actions/checkout@v4
124-
- name: Set up Python
125-
uses: actions/setup-python@v5
126-
with:
127-
python-version: ${{ matrix.python }}
128-
- name: Install dependencies
129-
run: |
130-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
131-
pip install tox tox-pdm
132-
- name: Run unit tests
133-
run: tox -e test-unit
134-
135-
ui-unit-tests:
136-
permissions:
137-
contents: "read"
138-
runs-on: ubuntu-latest
139-
steps:
140-
- name: Check out code
141-
uses: actions/checkout@v4
142-
143-
- name: Set up Node.js 22
144-
uses: actions/setup-node@v4
145-
with:
146-
node-version: '22'
147-
148-
- name: Install dependencies
149-
run: npm ci
150-
151-
- name: Run unit tests
152-
run: npm run test:unit
153-
154-
integration-tests:
155-
runs-on: ubuntu-latest
156-
strategy:
157-
matrix:
158-
python: ["3.10", "3.13"]
159-
steps:
160-
- uses: actions/checkout@v4
161-
- name: Set up Python
162-
uses: actions/setup-python@v5
163-
with:
164-
python-version: ${{ matrix.python }}
165-
- name: Install dependencies
166-
run: |
167-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
168-
pip install tox tox-pdm
169-
- name: Run integration tests
170-
run: tox -e test-integration -- -m smoke
171-
172-
ui-integration-tests:
173-
permissions:
174-
contents: "read"
175-
runs-on: ubuntu-latest
176-
steps:
177-
- name: Check out code
178-
uses: actions/checkout@v4
179-
180-
- name: Set up Node.js 22
181-
uses: actions/setup-node@v4
182-
with:
183-
node-version: '22'
184-
185-
- name: Install dependencies
186-
run: npm ci
187-
188-
- name: Run integration tests
189-
run: npm run test:integration
190-
191129
ui-pr-preview:
192-
needs: [ui-quality-checks, ui-precommit-checks, ui-unit-tests, ui-integration-tests]
130+
needs: [ui-quality-checks, ui-precommit-checks, ui-tests]
193131
permissions:
194132
contents: write
195133
pull-requests: write

.github/workflows/nightly.yml

Lines changed: 10 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -6,129 +6,20 @@ on:
66
workflow_dispatch: # Enables manual triggering of the workflow
77

88
jobs:
9-
unit-tests:
10-
runs-on: ubuntu-latest
9+
tests:
1110
strategy:
1211
matrix:
1312
python: ["3.10", "3.13"]
14-
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up Python
17-
uses: actions/setup-python@v5
18-
with:
19-
python-version: ${{ matrix.python }}
20-
- name: Install dependencies
21-
run: |
22-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
23-
pip install tox tox-pdm
24-
- name: Run unit tests
25-
run: tox -e test-unit
26-
27-
ui-unit-tests:
28-
permissions:
29-
contents: "read"
30-
runs-on: ubuntu-latest
31-
steps:
32-
- name: Check out code
33-
uses: actions/checkout@v3
34-
35-
- name: Set up Node.js 22
36-
uses: actions/setup-node@v4
37-
with:
38-
node-version: '22'
39-
40-
- name: Install dependencies
41-
run: npm ci
42-
43-
- name: Run unit tests
44-
run: npm run test:unit
45-
46-
integration-tests:
47-
runs-on: ubuntu-latest
48-
strategy:
49-
matrix:
50-
python: ["3.10", "3.13"]
51-
steps:
52-
- uses: actions/checkout@v4
53-
- name: Set up Python
54-
uses: actions/setup-python@v5
55-
with:
56-
python-version: ${{ matrix.python }}
57-
- name: Install dependencies
58-
run: |
59-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
60-
pip install tox tox-pdm
61-
- name: Run integration tests
62-
run: tox -e test-integration -- -m "smoke or sanity"
63-
64-
ui-integration-tests:
65-
permissions:
66-
contents: "read"
67-
runs-on: ubuntu-latest
68-
steps:
69-
- name: Check out code
70-
uses: actions/checkout@v3
71-
72-
- name: Set up Node.js 22
73-
uses: actions/setup-node@v4
74-
with:
75-
node-version: '22'
76-
77-
- name: Install dependencies
78-
run: npm ci
79-
80-
- name: Run integration tests
81-
run: npm run test:integration
82-
83-
e2e-tests:
84-
runs-on: ubuntu-latest
85-
strategy:
86-
matrix:
87-
python: ["3.10", "3.13"]
88-
steps:
89-
- uses: actions/checkout@v4
90-
- name: Set up Python
91-
uses: actions/setup-python@v5
92-
with:
93-
python-version: ${{ matrix.python }}
94-
- name: Install dependencies
95-
run: |
96-
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
97-
pip install tox tox-pdm
98-
- name: Run integration tests
99-
run: tox -e test-e2e -- -m smoke
100-
101-
ui-e2e-tests:
102-
permissions:
103-
contents: "read"
104-
id-token: "write"
105-
runs-on: ubuntu-latest
106-
steps:
107-
- name: Check out code
108-
uses: actions/checkout@v3
109-
110-
- name: Set up Node.js 22
111-
uses: actions/setup-node@v4
112-
with:
113-
node-version: '22'
114-
115-
- name: Install dependencies
116-
run: npm ci
117-
118-
- name: Generate Build
119-
run: |
120-
npm run build
121-
122-
- name: Start the Next.js app
123-
run: |
124-
npx serve@latest src/ui/out &
125-
npx wait-on http://localhost:3000 # Wait until the app is ready
13+
uses: ./.github/workflows/testing.yml
14+
with:
15+
python: ${{ matrix.python }}
16+
args: -m "smoke or sanity"
12617

127-
- name: Run Cypress tests
128-
run: npm run test:e2e --headless
18+
ui-tests:
19+
uses: ./.github/workflows/testing-ui.yml
12920

13021
build-and-publish:
131-
needs: [unit-tests, integration-tests, e2e-tests]
22+
needs: [tests]
13223
runs-on: ubuntu-latest
13324
strategy:
13425
matrix:
@@ -182,7 +73,7 @@ jobs:
18273
echo "Artifacts uploaded to: ${{ steps.artifact-upload.outputs.artifact-url }}"
18374
18475
publish-ui-build:
185-
needs: [ui-unit-tests, ui-integration-tests, ui-e2e-tests]
76+
needs: [ui-tests]
18677
permissions:
18778
contents: write
18879
pull-requests: write
@@ -236,7 +127,7 @@ jobs:
236127
publish_branch: gh-pages
237128

238129
build-and-push-container:
239-
needs: [unit-tests, integration-tests, e2e-tests]
130+
needs: [tests]
240131
runs-on: ubuntu-latest
241132
steps:
242133
- name: Checkout

0 commit comments

Comments
 (0)