@@ -74,12 +74,106 @@ jobs:
7474 wget
7575 - name : Install desktop dependencies
7676 run : just desktop-install-ci
77+ - name : Install Playwright Chromium
78+ run : cd desktop && pnpm exec playwright install --with-deps chromium
7779 - name : Desktop lint and format
7880 run : just desktop-check
7981 - name : Desktop build
8082 run : just desktop-build
83+ - name : Desktop smoke e2e
84+ run : cd desktop && pnpm exec playwright test --project=smoke
8185 - name : Desktop Tauri check
8286 run : just desktop-tauri-check
87+ - name : Upload desktop e2e artifacts
88+ if : failure()
89+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
90+ with :
91+ name : desktop-e2e-artifacts
92+ path : |
93+ desktop/playwright-report
94+ desktop/test-results
95+ if-no-files-found : ignore
96+
97+ desktop-e2e-integration :
98+ name : Desktop E2E Integration
99+ runs-on : ubuntu-latest
100+ timeout-minutes : 45
101+ permissions :
102+ contents : read
103+ steps :
104+ - uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
105+ - uses : cashapp/activate-hermit@e49f5cb4dd64ff0b0b659d1d8df499595451155a # v1
106+ - uses : Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
107+ with :
108+ workspaces : desktop/src-tauri
109+ - name : Install desktop dependencies
110+ run : just desktop-install-ci
111+ - name : Install Playwright Chromium
112+ run : cd desktop && pnpm exec playwright install --with-deps chromium
113+ - name : Desktop build
114+ run : just desktop-build
115+ - name : Start integration services
116+ run : docker compose up -d
117+ - name : Wait for integration services
118+ run : |
119+ wait_healthy() {
120+ local service="$1"
121+ local container="$2"
122+ for attempt in $(seq 1 60); do
123+ status=$(docker inspect --format='{{.State.Health.Status}}' "${container}" 2>/dev/null || echo "not_found")
124+ if [ "${status}" = "healthy" ]; then
125+ echo "${service} is healthy"
126+ return 0
127+ fi
128+ sleep 2
129+ done
130+ docker logs "${container}" || true
131+ return 1
132+ }
133+ wait_healthy "MySQL" "sprout-mysql"
134+ wait_healthy "Redis" "sprout-redis"
135+ wait_healthy "Typesense" "sprout-typesense"
136+ - name : Build relay
137+ run : cargo build -p sprout-relay
138+ - name : Start relay
139+ run : |
140+ nohup env \
141+ DATABASE_URL=mysql://sprout:sprout_dev@localhost:3306/sprout \
142+ REDIS_URL=redis://localhost:6379 \
143+ TYPESENSE_URL=http://localhost:8108 \
144+ TYPESENSE_API_KEY=sprout_dev_key \
145+ RELAY_URL=ws://localhost:3000 \
146+ SPROUT_BIND_ADDR=0.0.0.0:3000 \
147+ SPROUT_REQUIRE_AUTH_TOKEN=false \
148+ ./target/debug/sprout-relay > /tmp/sprout-relay.log 2>&1 &
149+ echo $! > /tmp/sprout-relay.pid
150+ for attempt in $(seq 1 60); do
151+ if ! kill -0 "$(cat /tmp/sprout-relay.pid)" 2>/dev/null; then
152+ cat /tmp/sprout-relay.log
153+ exit 1
154+ fi
155+ status_code=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000/api/channels || true)
156+ if [ "${status_code}" != "000" ]; then
157+ exit 0
158+ fi
159+ sleep 1
160+ done
161+ cat /tmp/sprout-relay.log
162+ exit 1
163+ - name : Seed desktop e2e data
164+ run : bash scripts/setup-desktop-test-data.sh
165+ - name : Desktop relay-backed e2e
166+ run : cd desktop && pnpm exec playwright test --project=integration
167+ - name : Upload desktop integration artifacts
168+ if : failure()
169+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
170+ with :
171+ name : desktop-e2e-integration-artifacts
172+ path : |
173+ desktop/playwright-report
174+ desktop/test-results
175+ /tmp/sprout-relay.log
176+ if-no-files-found : ignore
83177
84178 security :
85179 name : Security
0 commit comments