Skip to content

Commit f8d19d0

Browse files
committed
use suggested workflow
1 parent a4a8e6e commit f8d19d0

File tree

2 files changed

+18
-119
lines changed

2 files changed

+18
-119
lines changed

.github/workflows/e2e-from-plugin-tools.yml

Lines changed: 0 additions & 80 deletions
This file was deleted.

.github/workflows/e2e.yml

Lines changed: 18 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
name: e2e
2-
1+
name: E2E tests
32
on:
4-
push:
5-
branches:
6-
- main
73
pull_request:
8-
branches:
9-
- main
10-
11-
permissions: read-all
124

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
168

179
jobs:
1810
resolve-versions:
@@ -28,9 +20,9 @@ jobs:
2820
id: resolve-versions
2921
uses: grafana/plugin-actions/e2e-version@main
3022

31-
run-e2e:
23+
playwright-tests:
3224
needs: resolve-versions
33-
timeout-minutes: 15
25+
timeout-minutes: 60
3426
strategy:
3527
fail-fast: false
3628
matrix:
@@ -44,25 +36,20 @@ jobs:
4436
uses: actions/setup-node@v4
4537
with:
4638
node-version-file: .nvmrc
47-
cache: 'yarn'
4839

49-
- name: Install dependencies
40+
- name: Install yarn dependencies
5041
run: yarn install
5142

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
6244
uses: magefile/mage-action@v3
6345
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
6653

6754
- name: Install Playwright Browsers
6855
run: yarn playwright install --with-deps
@@ -72,14 +59,6 @@ jobs:
7259
docker-compose pull
7360
GRAFANA_VERSION=${{ matrix.GRAFANA_IMAGE.VERSION }} GRAFANA_IMAGE=${{ matrix.GRAFANA_IMAGE.NAME }} docker-compose up -d
7461
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-
8362
- name: Wait for Grafana to start
8463
uses: nev7n/wait_for_response@v1
8564
with:
@@ -90,11 +69,11 @@ jobs:
9069

9170
- name: Run Playwright tests
9271
id: run-tests
93-
run: yarn e2e
72+
run: yarn playwright test
9473

95-
- name: Upload playwright artifacts
74+
- name: Upload artifacts
9675
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') }}
9877
with:
9978
name: playwright-report-${{ matrix.GRAFANA_IMAGE.NAME }}-v${{ matrix.GRAFANA_IMAGE.VERSION }}-${{github.run_id}}
10079
path: playwright-report/

0 commit comments

Comments
 (0)