-
-
Notifications
You must be signed in to change notification settings - Fork 534
81 lines (67 loc) · 2.19 KB
/
e2e_tests.yml
File metadata and controls
81 lines (67 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: e2e tests
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
concurrency:
group: e2e-tests-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
e2e-tests:
name: e2e tests
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
ruby_version: ["3.4.5"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up `.env` file
run: |
cd .devcontainer
cp .env.example .env
- name: Start mini rails app
run: |
cd .devcontainer
source .env
docker compose --profile e2e up -d sentry-rails-mini
- name: Start mini svelte app
run: |
cd .devcontainer
source .env
docker compose --profile e2e up -d sentry-svelte-mini
- name: Wait for services to be healthy
run: |
echo "Waiting for Rails mini app to be ready..."
timeout 60 bash -c 'until curl -s http://localhost:5000/health | grep -q "ok"; do echo "Waiting for Rails app..."; sleep 2; done'
echo "✅ Rails mini app is ready"
echo "Waiting for Svelte mini app to be ready..."
timeout 60 bash -c 'until curl -s http://localhost:5001/health | grep -q "ok"; do echo "Waiting for Svelte app..."; sleep 2; done'
echo "✅ Svelte mini app is ready"
echo "All services are healthy!"
- name: Run e2e tests
run: |
cd .devcontainer
source .env
docker compose --profile e2e run --rm sentry-test bundle exec rake
env:
SENTRY_E2E_RAILS_APP_URL: http://sentry-rails-mini:5000
SENTRY_E2E_SVELTE_APP_URL: http://sentry-svelte-mini:5001
- name: Stop e2e services
if: always()
run: |
cd .devcontainer
source .env
docker compose --profile e2e down
- name: Upload test artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-test-logs-ruby-${{ matrix.ruby_version }}
path: |
spec/apps/rails-mini/log/sentry_debug_events.log
retention-days: 7