forked from hpi-studyu/studyu
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 2.01 KB
/
e2e_tests.yml
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
name: E2E tests
on:
push:
paths:
- 'designer_v2/**'
- 'core/**'
- 'flutter_common/**'
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-e2e-tests
cancel-in-progress: true
jobs:
drive_web:
runs-on: ubuntu-latest
steps:
- name: Await potential publishing on Pub.dev
uses: johannesvedder/await-workflow@v1
with:
workflowId: 'publish_pubdev.yml'
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Init workspace
uses: ./.github/workflows/init-workspace
- name: Setup ChromeDriver
uses: nanasess/setup-chromedriver@v2
- name: Enable web support
run: flutter config --enable-web
- name: Initialize Supabase
run: |
dart pub global activate melos
melos bootstrap
dart pub get
docker network create studyu_network || true
cp docker/supabase/.env.example docker/supabase/.env
cp docker/proxy/.env.example docker/proxy/.env
cp flutter_common/lib/envs/.env.local.example flutter_common/lib/envs/.env.local
docker compose -f docker/supabase/docker-compose-db.yml up -d
docker compose -f docker/supabase/docker-compose.yml up -d
docker compose -f docker/proxy/docker-compose-proxy.yml up -d
while [ "$(docker inspect --format='{{.State.Health.Status}}' supabase-db)" != "healthy" ]; do sleep 1; done
docker exec -i supabase-db psql -U postgres -d postgres < ./database/app_config.sql.example
- name: Start Chrome Driver
run: |
export DISPLAY=:99
chromedriver --port=4444 &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
- name: Run Flutter E2E tests
working-directory: ./designer_v2
run: |
flutter drive --driver=test_driver/integration_driver.dart \
--target=integration_test/app_test.dart -d web-server \
--dart-define="STUDYU_ENV=.env.local"