Skip to content

Commit 23d3a63

Browse files
rtibblesclaude
andcommitted
feat: add install smoke tests for Ubuntu 16.04-24.04
Test that the .deb installs correctly and Kolibri starts on all supported Ubuntu versions. Verifies Python >= 3.10 is available and Kolibri responds on port 8080. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a55e783 commit 23d3a63

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/install_test.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Install smoke test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
deb-file-name:
7+
description: "Artifact name of the .deb file to test"
8+
required: true
9+
type: string
10+
11+
jobs:
12+
install_test:
13+
name: Install test (${{ matrix.image }})
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
image:
19+
- ubuntu:16.04
20+
- ubuntu:18.04
21+
- ubuntu:20.04
22+
- ubuntu:22.04
23+
- ubuntu:24.04
24+
steps:
25+
- name: Download .deb artifact
26+
uses: actions/download-artifact@v7
27+
with:
28+
name: ${{ inputs.deb-file-name }}
29+
path: /tmp/deb
30+
31+
- name: Run install test in Docker
32+
run: |
33+
docker run --rm \
34+
-v /tmp/deb:/tmp/deb \
35+
-e DEBIAN_FRONTEND=noninteractive \
36+
-e TZ=UTC \
37+
${{ matrix.image }} \
38+
bash -c '
39+
set -e
40+
41+
# Install minimal dependencies
42+
apt-get update -qq
43+
apt-get install -y -qq curl adduser python3 2>/dev/null || apt-get install -y -qq curl adduser
44+
45+
# Install the .deb — service start may fail in containers but
46+
# all configuration completes before that step
47+
dpkg -i /tmp/deb/*.deb 2>&1 || true
48+
apt-get install -f -y 2>&1 || true
49+
dpkg --configure -a 2>&1 || true
50+
51+
# Start kolibri — verifies the wrapper is on PATH and works
52+
KOLIBRI_USER=$(cat /etc/kolibri/username 2>/dev/null || echo "kolibri")
53+
su -s /bin/sh "$KOLIBRI_USER" -c "kolibri start"
54+
55+
# Wait for Kolibri to become available
56+
echo "Waiting for Kolibri to start on port 8080..."
57+
for i in $(seq 1 60); do
58+
if curl -s --max-time 5 -o /dev/null -w "%{http_code}" http://localhost:8080 | grep -q "200\|302"; then
59+
echo "PASS: Kolibri is responding on port 8080 (attempt $i)"
60+
exit 0
61+
fi
62+
sleep 2
63+
done
64+
echo "FAIL: Kolibri did not respond on port 8080 within 120 seconds"
65+
exit 1
66+
'

.github/workflows/pr_build.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,11 @@ jobs:
5050
uses: ./.github/workflows/build_deb.yml
5151
with:
5252
tar-url: ${{ needs.latest_kolibri_release.outputs.tar-url }}
53+
54+
install_test:
55+
name: Install smoke tests
56+
needs: [pre_job, build_deb]
57+
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
58+
uses: ./.github/workflows/install_test.yml
59+
with:
60+
deb-file-name: ${{ needs.build_deb.outputs.deb-file-name }}

0 commit comments

Comments
 (0)