generated from grafana/grafana-starter-datasource-backend
-
Notifications
You must be signed in to change notification settings - Fork 68
61 lines (51 loc) · 1.61 KB
/
grafana-bench.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
58
59
60
name: Grafana Bench
on:
push:
# Only run on push to the main branch
branches: [main, master]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
- uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Build backend
uses: magefile/mage-action@v3
with:
args: buildAll
version: latest
- name: Install frontend dependencies
run: yarn install --frozen-lockfile
- name: Build frontend
run: yarn build
env:
NODE_OPTIONS: '--max_old_space_size=4096'
- name: Install and run Docker Compose
uses: hoverkraft-tech/[email protected]
with:
compose-file: './docker-compose.yml'
- name: Ensure Grafana is running
run: |
curl http://localhost:3000
- name: Run Grafana Bench tests
run: |
docker run --rm \
--network=host \
--volume="./:/home/bench/tests/" \
us-docker.pkg.dev/grafanalabs-global/docker-grafana-bench-prod/grafana-bench:v0.3.0 test \
--test-runner "playwright" \
--test-suite-base "/home/bench/tests/" \
--grafana-url "http://localhost:3000" \
--pw-execute-cmd "yarn e2e" \
--pw-prepare-cmd "yarn install --frozen-lockfile; yarn playwright install" \
--test-env-vars "CI=true" \
--log-level DEBUG