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..a38aa6a5 100644 --- a/load-tests/script.js +++ b/load-tests/script.js @@ -1,11 +1,15 @@ 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, + thresholds: { + // expect all checks to pass + checks: ['rate>=1'], + }, +}; const API_SECRET = __ENV.INFERABLE_TEST_API_SECRET const CLUSTER_ID = __ENV.INFERABLE_TEST_CLUSTER_ID