Skip to content

Commit 5f988dd

Browse files
committed
CI/frontend: test all build targets
1 parent 80dcc31 commit 5f988dd

File tree

8 files changed

+99
-8
lines changed

8 files changed

+99
-8
lines changed

.github/actions/frontend-build/action.yml

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ inputs:
99
description: 'Whether to run Cypress tests'
1010
required: false
1111
default: 'false'
12+
test-build-commands:
13+
description: 'Whether to test all build commands'
14+
required: false
15+
default: 'false'
1216
node-version:
1317
description: 'Node.js version to use'
1418
required: false
@@ -40,7 +44,81 @@ runs:
4044
shell: bash
4145

4246
- name: Build frontend
43-
run: npm run build
47+
run: make build
48+
working-directory: frontend
49+
shell: bash
50+
51+
# Test Makefile targets
52+
- name: Test make build
53+
if: inputs.test-build-commands == 'true'
54+
run: |
55+
rm -rf dist
56+
make build
57+
[ -d "dist/frontend" ] || { echo "Error: make build failed"; exit 1; }
58+
working-directory: frontend
59+
shell: bash
60+
61+
62+
- name: Test make build-development
63+
if: inputs.test-build-commands == 'true'
64+
run: |
65+
rm -rf dist
66+
make build-development
67+
[ -d "dist/frontend" ] || { echo "Error: make build-development failed"; exit 1; }
68+
working-directory: frontend
69+
shell: bash
70+
71+
- name: Test make build-fuzzing
72+
if: inputs.test-build-commands == 'true'
73+
run: |
74+
rm -rf dist
75+
make build-fuzzing
76+
[ -d "dist/frontend" ] || { echo "Error: make build-fuzzing failed"; exit 1; }
77+
working-directory: frontend
78+
shell: bash
79+
80+
- name: Test make build-local
81+
if: inputs.test-build-commands == 'true'
82+
run: |
83+
rm -rf dist
84+
make build-local
85+
[ -d "dist/frontend" ] || { echo "Error: make build-local failed"; exit 1; }
86+
working-directory: frontend
87+
shell: bash
88+
89+
- name: Test make build-prod
90+
if: inputs.test-build-commands == 'true'
91+
run: |
92+
rm -rf dist
93+
make build-prod
94+
[ -d "dist/frontend" ] || { echo "Error: make build-prod failed"; exit 1; }
95+
working-directory: frontend
96+
shell: bash
97+
98+
- name: Test make build-producer
99+
if: inputs.test-build-commands == 'true'
100+
run: |
101+
rm -rf dist
102+
make build-producer
103+
[ -d "dist/frontend" ] || { echo "Error: make build-producer failed"; exit 1; }
104+
working-directory: frontend
105+
shell: bash
106+
107+
- name: Test make build-production
108+
if: inputs.test-build-commands == 'true'
109+
run: |
110+
rm -rf dist
111+
make build-production
112+
[ -d "dist/frontend" ] || { echo "Error: make build-production failed"; exit 1; }
113+
working-directory: frontend
114+
shell: bash
115+
116+
- name: Test make build-webnodelocal
117+
if: inputs.test-build-commands == 'true'
118+
run: |
119+
rm -rf dist
120+
make build-webnodelocal
121+
[ -d "dist/frontend" ] || { echo "Error: make build-webnodelocal failed"; exit 1; }
44122
working-directory: frontend
45123
shell: bash
46124

@@ -51,4 +129,4 @@ runs:
51129
working-directory: frontend
52130
start: npm start
53131
wait-on: http://localhost:4200
54-
wait-on-timeout: 180s
132+
wait-on-timeout: 180s

.github/workflows/frontend-macos-13.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Frontend build
20-
uses: ./.github/actions/frontend-build
20+
uses: ./.github/actions/frontend-build
21+
with:
22+
test-build-commands: 'true'

.github/workflows/frontend-macos-14.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Frontend build
20-
uses: ./.github/actions/frontend-build
20+
uses: ./.github/actions/frontend-build
21+
with:
22+
test-build-commands: 'true'

.github/workflows/frontend-macos-15.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Frontend build
20-
uses: ./.github/actions/frontend-build
20+
uses: ./.github/actions/frontend-build
21+
with:
22+
test-build-commands: 'true'

.github/workflows/frontend-macos-latest.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Frontend build
20-
uses: ./.github/actions/frontend-build
20+
uses: ./.github/actions/frontend-build
21+
with:
22+
test-build-commands: 'true'

.github/workflows/frontend-ubuntu-22-04.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Frontend build
20-
uses: ./.github/actions/frontend-build
20+
uses: ./.github/actions/frontend-build
21+
with:
22+
test-build-commands: 'true'

.github/workflows/frontend-ubuntu-24-04-arm.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ jobs:
1717
uses: actions/checkout@v5
1818

1919
- name: Frontend build
20-
uses: ./.github/actions/frontend-build
20+
uses: ./.github/actions/frontend-build
21+
with:
22+
test-build-commands: 'true'

.github/workflows/frontend.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ jobs:
2222
with:
2323
run-prettier-check: 'true'
2424
run-tests: 'true'
25+
test-build-commands: 'false'

0 commit comments

Comments
 (0)