-
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (39 loc) · 1.05 KB
/
k6.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: K6 🛠️
on:
pull_request:
types:
- ready_for_review
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
jobs:
k6-load-script:
name: "K6 Load test"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
goVersion: [ '1.18', '1.19', '1.20' ]
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.goVersion }}
check-latest: true
- name: Install k6
run: |
curl https://github.com/grafana/k6/releases/download/v0.49.0/k6-v0.49.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1
- name: Start application and run K6
continue-on-error: true
run: |
go run main.go serve --config tests/webhooks.tests.yaml >/dev/null 2>&1 &
until $(curl --output /dev/null --silent --head --fail http://localhost:8080/metrics); do
printf '.'
sleep 1
done
./k6 run tests/loadtesting/k6-load-script.js