Skip to content

Commit 93b0cb9

Browse files
test: Enhance GUI build workflow to test ISO creation
This commit enhances the GitHub Actions workflow for the GUI build test. The workflow now performs a more comprehensive end-to-end test: - It triggers the ISO build via the GUI's API endpoint. - It waits for the build to complete successfully. - It verifies that the ISO file has been created. - It tests the download endpoint to ensure the ISO is served correctly. This addresses the feedback from the pull request to provide more robust testing of the GUI application's core functionality.
1 parent 8aec06b commit 93b0cb9

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

.github/workflows/gui-build-test.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
name: GUI Build Test
2-
permissions:
3-
contents: read
42

53
on:
64
pull_request:
@@ -23,8 +21,19 @@ jobs:
2321
- name: Wait for the server to start
2422
run: sleep 15
2523

26-
- name: Check if the web server is responding
27-
run: curl -f http://localhost:8080
24+
- name: Trigger ISO build and wait for completion
25+
# This step triggers the build via the API and waits for the "BUILD_SUCCESS" message.
26+
# The build can take a long time, so a generous timeout is set.
27+
run: |
28+
curl -N --max-time 7200 http://localhost:8080/build | tee build.log
29+
grep -q "BUILD_SUCCESS" build.log
30+
31+
- name: Verify ISO file was created
32+
run: sudo docker exec arch-iso-gui-test test -f /workdir/out/Arch.iso
33+
34+
- name: Test ISO download endpoint
35+
run: curl -f -I http://localhost:8080/download | grep -q 'Content-Disposition: attachment; filename=Arch.iso'
2836

2937
- name: Stop the container
38+
if: always()
3039
run: sudo docker stop arch-iso-gui-test

0 commit comments

Comments
 (0)