generated from pagopa/template-java-spring-microservice
-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.53 KB
/
07_performance_test.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Performance Test
on:
# schedule:
# - cron: '35 16 * * *'
workflow_dispatch:
inputs:
environment:
required: true
type: choice
description: Select the Environment
options:
- dev
- uat
test-type:
required: true
type: choice
description: Select the Test Type
options:
- constant
- load
- ramping
- smoke
- soak
- spike
- stress
script-name:
required: true
type: choice
description: Select the Script Name
options:
- create_flow_sequential
permissions:
id-token: write
contents: read
deployments: write
jobs:
run_performance_test:
name: Test ${{(github.event.inputs == null && 'dev') || inputs.environment }}
runs-on: ubuntu-latest
environment: ${{(github.event.inputs == null && 'dev') || inputs.environment }}
steps:
- name: Checkout repository
uses: actions/checkout@1f9a0c22da41e6ebfa534300ef656657ea2c6707
- name: Run k6 script
run: |
cd ./performance-test
sub_key="${{ secrets.PSP_SUBSCRIPTION_KEY }}" env="${{ inputs.environment }}" type="${{ inputs.test-type }}" script="${{ inputs.script-name }}" docker compose -f docker-compose.yaml up
# sh ./performance-test/run_performance_test.sh ${{ env.ENVIRONMENT }} ${{ env.TEST_TYPE }} ${{ env.SCRIPT }} ${{ secrets.API_SUBSCRIPTION_KEY }}
#${{ secrets.COSMOS_SUBSCRIPTION_KEY }}