-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (71 loc) · 2.2 KB
/
end_to_end_tests.yaml
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
82
83
84
85
name: End-to-end tests
on:
push:
branches: ['main']
pull_request:
branches: ['main']
jobs:
end_to_end_tests:
name: 'Node ${{ matrix.node-version }}'
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
OAUTH_DEXIDP_CLIENT_ID: client_test_web_id
OAUTH_DEXIDP_CLIENT_SECRET: client_test_web_secret
OAUTH_DEXIDP_REDIRECT_URL: "http://localhost:5173/auth/login/oauth2/"
OAUTH_DEXIDP_OIDC_CONFIGURATION_ENDPOINT: "http://127.0.0.1:5556/dex/.well-known/openid-configuration"
PUBLIC_OAUTH_CLIENT_NAME: dexidp
PUBLIC_FRACTAL_VIZARR_VIEWER_URL: http://localhost:3000/vizarr
strategy:
matrix:
node-version: ['18', '20']
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: fractal_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
oauth2:
image: ghcr.io/fractal-analytics-platform/oauth:0.1
ports:
- 5556:5556
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
# Fix for Node 18 issue:
# See: https://github.com/node-fetch/node-fetch/issues/1624
- name: Set fractal-server host for Node 18
if: matrix.node-version == '18'
run: echo "FRACTAL_SERVER_HOST=http://127.0.0.1:8000" >> $GITHUB_ENV
- name: Run Playwright tests [v1]
run: npx playwright test
env:
TEST_VERSION: v1
- name: Run Playwright tests [v2]
run: npx playwright test
env:
TEST_VERSION: v2
FRACTAL_RUNNER_BACKEND: local_experimental
- name: Archive test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-folder
path: test-results
overwrite: true