-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
13 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,16 +3,24 @@ name: Load Test | |
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
vu: | ||
description: 'Number of virtual users to simulate' | ||
required: false | ||
type: number | ||
default: 10 | ||
duration: | ||
description: 'Duration of the test in seconds' | ||
required: false | ||
type: number | ||
default: 30 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
load-test: | ||
defaults: | ||
run: | ||
working-directory: ./load-test | ||
runs-on: ubuntu-latest | ||
name: Load Test | ||
env: | ||
|
@@ -27,8 +35,8 @@ jobs: | |
- name: Run k6 local test | ||
uses: grafana/[email protected] | ||
with: | ||
filename: ${{ matrix.name }}-test.js | ||
flags: --vus 10 --duration 30s | ||
filename: ./load-test/${{ matrix.name }}-test.js | ||
flags: --vus ${{ github.event.inputs.vu }} --duration ${{ github.event.inputs.duration }}s | ||
env: | ||
BACKEND_URL: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }}/api | ||
FRONTEND_URL: https://${{ env.PREFIX }}-frontend.${{ env.DOMAIN }} |