From db1acfc5bd844fd38fd8d5bc26ad0e7e24d0be91 Mon Sep 17 00:00:00 2001 From: John Smith Date: Sun, 1 Dec 2024 15:33:24 +1030 Subject: [PATCH] ci: Fail e2e on any error --- .github/workflows/e2e.yml | 4 ++++ load-tests/script.js | 11 ++++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 7539af94..ead153d5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,3 +1,5 @@ +name: E2E heartbeat + on: schedule: - cron: "0 * * * *" @@ -26,4 +28,6 @@ jobs: - uses: grafana/run-k6-action@v1 with: path: ./load-tests/script.js + fail-fast: true + flags: --throw - run: curl -X POST https://uptime.betterstack.com/api/v1/heartbeat/hYrsEwXdwJDDqsNmCEjX2umS diff --git a/load-tests/script.js b/load-tests/script.js index 0ff3f330..4224ea3c 100644 --- a/load-tests/script.js +++ b/load-tests/script.js @@ -1,11 +1,12 @@ import http from 'k6/http'; import { sleep, check } from 'k6'; -// K6 defaults -// export const options = { -// vus: 1, -// iterations: 1, -// }; +export const options = { + // K6 defaults + // vus: 1, + // iterations: 1, + checks: ['rate>=1'], +}; const API_SECRET = __ENV.INFERABLE_TEST_API_SECRET const CLUSTER_ID = __ENV.INFERABLE_TEST_CLUSTER_ID