Skip to content

Commit 1601723

Browse files
feat: add smoke test fir ui app on CI
1 parent 473a073 commit 1601723

File tree

2 files changed

+68
-0
lines changed

2 files changed

+68
-0
lines changed

.github/workflows/build.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,33 @@ jobs:
2828
- name: Build bin-appimage
2929
run: nix build .#bin-appimage
3030

31+
32+
- name: Install OpenGL libs
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y \
36+
libgl1 \
37+
libegl1 \
38+
libopengl0
39+
40+
- name: Smoke test (Linux)
41+
run: |
42+
set +e
43+
timeout 10 ./result/logos-app.AppImage --appimage-extract-and-run -platform offscreen 2>&1 | tee /tmp/logos-launch.log
44+
CODE=${PIPESTATUS[0]}
45+
set -e
46+
if grep -qE "QQmlApplicationEngine failed|module.*is not installed|Cannot assign|failed to load component" /tmp/logos-launch.log; then
47+
echo "❌ Critical QML errors"
48+
cat /tmp/logos-launch.log
49+
exit 1
50+
fi
51+
if [ "$CODE" -ne 124 ] && [ "$CODE" -ne 0 ]; then
52+
echo "❌ App crashed with exit code $CODE"
53+
cat /tmp/logos-launch.log
54+
exit 1
55+
fi
56+
echo "✅ Smoke test passed"
57+
3158
- name: Rename AppImage with architecture
3259
run: |
3360
arch="${{ matrix.arch }}"
@@ -51,6 +78,26 @@ jobs:
5178
- name: Build bin-macos-app
5279
run: nix build .#bin-macos-app
5380

81+
- name: Smoke test
82+
run: |
83+
./result/LogosApp.app/Contents/MacOS/LogosApp -platform offscreen > /tmp/logos-launch.log 2>&1 &
84+
APP_PID=$!
85+
sleep 10
86+
if grep -qE "QQmlApplicationEngine failed|module.*is not installed|Cannot assign|failed to load component" /tmp/logos-launch.log; then
87+
echo "❌ Critical QML errors detected"
88+
cat /tmp/logos-launch.log
89+
kill $APP_PID 2>/dev/null
90+
exit 1
91+
fi
92+
if kill -0 $APP_PID 2>/dev/null; then
93+
kill $APP_PID
94+
echo "✅ App launched and ran for 10s"
95+
else
96+
echo "❌ App crashed"
97+
cat /tmp/logos-launch.log
98+
exit 1
99+
fi
100+
54101
- name: Package app bundle as tarball
55102
run: |
56103
app=$(find result/ -name '*.app' -maxdepth 1 -print -quit)

ci/macos.Jenkinsfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,27 @@ pipeline {
4343
} }
4444
}
4545

46+
stage('Smoke Test') {
47+
steps { script {
48+
sh '''
49+
nix build '.#app'
50+
timeout 10 ./result/bin/LogosApp -platform offscreen 2>&1 | tee /tmp/logos-launch.log || true
51+
CODE=${PIPESTATUS[0]}
52+
if grep -qE "failed to load|is not installed|Cannot assign|No such file" /tmp/logos-launch.log; then
53+
echo "Critical QML errors detected"
54+
cat /tmp/logos-launch.log
55+
exit 1
56+
fi
57+
if [ "$CODE" -ne 124 ] && [ "$CODE" -ne 0 ]; then
58+
echo "App crashed with exit code $CODE"
59+
cat /tmp/logos-launch.log
60+
exit 1
61+
fi
62+
echo "Smoke test passed"
63+
'''
64+
} }
65+
}
66+
4667
stage('Package') {
4768
steps {
4869
sh 'mkdir -p pkg'

0 commit comments

Comments
 (0)