@@ -74,12 +74,100 @@ 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 : Start relay
137+ run : |
138+ nohup env \
139+ DATABASE_URL=mysql://sprout:sprout_dev@localhost:3306/sprout \
140+ REDIS_URL=redis://localhost:6379 \
141+ TYPESENSE_URL=http://localhost:8108 \
142+ TYPESENSE_API_KEY=sprout_dev_key \
143+ RELAY_URL=ws://localhost:3000 \
144+ SPROUT_BIND_ADDR=0.0.0.0:3000 \
145+ SPROUT_REQUIRE_AUTH_TOKEN=false \
146+ cargo run -p sprout-relay > /tmp/sprout-relay.log 2>&1 &
147+ echo $! > /tmp/sprout-relay.pid
148+ for attempt in $(seq 1 60); do
149+ status_code=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3000/api/channels || true)
150+ if [ "${status_code}" != "000" ]; then
151+ exit 0
152+ fi
153+ sleep 1
154+ done
155+ cat /tmp/sprout-relay.log
156+ exit 1
157+ - name : Seed desktop e2e data
158+ run : bash scripts/setup-desktop-test-data.sh
159+ - name : Desktop relay-backed e2e
160+ run : cd desktop && pnpm exec playwright test --project=integration
161+ - name : Upload desktop integration artifacts
162+ if : failure()
163+ uses : actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
164+ with :
165+ name : desktop-e2e-integration-artifacts
166+ path : |
167+ desktop/playwright-report
168+ desktop/test-results
169+ /tmp/sprout-relay.log
170+ if-no-files-found : ignore
83171
84172 security :
85173 name : Security
0 commit comments