1
- name : e2e
2
-
1
+ name : E2E tests
3
2
on :
4
- push :
5
- branches :
6
- - main
7
3
pull_request :
8
- branches :
9
- - main
10
-
11
- permissions : read-all
12
4
13
- concurrency :
14
- group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
15
- cancel-in-progress : true
5
+ permissions :
6
+ contents : read
7
+ id-token : write
16
8
17
9
jobs :
18
10
resolve-versions :
28
20
id : resolve-versions
29
21
uses : grafana/plugin-actions/e2e-version@main
30
22
31
- run-e2e :
23
+ playwright-tests :
32
24
needs : resolve-versions
33
- timeout-minutes : 15
25
+ timeout-minutes : 60
34
26
strategy :
35
27
fail-fast : false
36
28
matrix :
@@ -44,25 +36,20 @@ jobs:
44
36
uses : actions/setup-node@v4
45
37
with :
46
38
node-version-file : .nvmrc
47
- cache : ' yarn'
48
39
49
- - name : Install dependencies
40
+ - name : Install yarn dependencies
50
41
run : yarn install
51
42
52
- - name : Build frontend
53
- run : yarn build
54
-
55
- - name : Setup Go environment
56
- uses : actions/setup-go@v5
57
- with :
58
- go-version-file : ' ./go.mod'
59
- cache-dependency-path : " **/*.sum"
60
-
61
- - name : Build backend [linux]
43
+ - name : Install Mage
62
44
uses : magefile/mage-action@v3
63
45
with :
64
- version : latest
65
- args : build:linux
46
+ install-only : true
47
+
48
+ - name : Build binaries
49
+ run : mage -v build:linux
50
+
51
+ - name : Build frontend
52
+ run : yarn build
66
53
67
54
- name : Install Playwright Browsers
68
55
run : yarn playwright install --with-deps
72
59
docker-compose pull
73
60
GRAFANA_VERSION=${{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=${{ matrix.GRAFANA_IMAGE.NAME }} docker-compose up -d
74
61
75
- - name : Wait for prometheus to start
76
- uses : nev7n/wait_for_response@v1
77
- with :
78
- url : ' http://localhost:9090/-/ready'
79
- responseCode : 200
80
- timeout : 20000
81
- interval : 500
82
-
83
62
- name : Wait for Grafana to start
84
63
uses : nev7n/wait_for_response@v1
85
64
with :
@@ -90,11 +69,11 @@ jobs:
90
69
91
70
- name : Run Playwright tests
92
71
id : run-tests
93
- run : yarn e2e
72
+ run : yarn playwright test
94
73
95
- - name : Upload playwright artifacts
74
+ - name : Upload artifacts
96
75
uses : actions/upload-artifact@v4
97
- if : ${{ github.repository_owner != 'grafana' && (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }}
76
+ if : ${{ (always() && steps.run-tests.outcome == 'success') || (failure() && steps.run-tests.outcome == 'failure') }}
98
77
with :
99
78
name : playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}}
100
79
path : playwright-report/
0 commit comments