From 9ecb4010709c8ae316f8b6d4bbbe069e7c54328d Mon Sep 17 00:00:00 2001 From: Jeff Levin Date: Sat, 2 Nov 2024 00:53:56 +0100 Subject: [PATCH] Fix failing bench github action (#1041) --- .github/workflows/grafana-bench.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/grafana-bench.yml b/.github/workflows/grafana-bench.yml index 27ce2e18..153cfcf5 100644 --- a/.github/workflows/grafana-bench.yml +++ b/.github/workflows/grafana-bench.yml @@ -3,6 +3,8 @@ on: push: # Only run on push to the main branch branches: [main, master] + pull_request: + branches: [main, master] jobs: test: @@ -39,30 +41,21 @@ jobs: with: compose-file: './docker-compose.yml' - - name: Wait for Grafana to start + - name: Ensure Grafana is running run: | curl http://localhost:3000 - #RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3000) - #echo $response - #if [ $RESPONSE -ne 200 ]; then - # sleep 5; - # echo "Grafana is not accessible" - # exit 1 - #fi - 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-rc3 test \ - --grafana-admin-password "admin" \ - --grafana-admin-user "admin" \ + 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" \ - --log-level DEBUG \ --pw-execute-cmd "yarn e2e" \ - --pw-prepare-cmd "yarn install --frozen-lockfile && yarn playwright install" \ + --pw-prepare-cmd "yarn install --frozen-lockfile; yarn playwright install" \ --test-env-vars "CI=true" \ - --test-runner "playwright" \ - --test-suite-base "/home/bench/tests/" + --log-level DEBUG