Skip to content

Commit

Permalink
added workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Lemieux committed Sep 28, 2024
1 parent ffc6dfa commit 178bd17
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: k6 Load Test

on:
push:
branches:
- '**'

jobs:
run-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup K6
uses: grafana/setup-k6-action@v1
- name: Run local k6 test
uses: grafana/run-k6-action@v1
env:
K6_CLOUD_TOKEN: ${{ secrets.K6_CLOUD_TOKEN }}
K6_CLOUD_PROJECT_ID: ${{ secrets.K6_CLOUD_PROJECT_ID }}
with:
path: test.js
12 changes: 12 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import http from 'k6/http';
import { sleep } from 'k6';

export const options = {
duration: '1m',
vus: 50,
};

export default function () {
const res = http.get('https://quickpizza.grafana.com/');
sleep(1);
}

0 comments on commit 178bd17

Please sign in to comment.