Skip to content

Commit

Permalink
ci: Fail e2e on any error
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith committed Dec 1, 2024
1 parent e51a7d0 commit 8cdf30a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
name: E2E heartbeat

on:
schedule:
- cron: "0 * * * *"
Expand Down Expand Up @@ -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
14 changes: 9 additions & 5 deletions load-tests/script.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 8cdf30a

Please sign in to comment.