Skip to content

Commit

Permalink
fix: Load TEST (#1722)
Browse files Browse the repository at this point in the history
  • Loading branch information
mishraomp authored Dec 12, 2023
1 parent c4197f3 commit 3f128c5
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -27,8 +35,8 @@ jobs:
- name: Run k6 local test
uses: grafana/k6-action@v0.3.1
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 }}

0 comments on commit 3f128c5

Please sign in to comment.