-
Notifications
You must be signed in to change notification settings - Fork 22
79 lines (71 loc) · 2.4 KB
/
irs-load-test.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: IRS Load Test
on:
workflow_dispatch: # Trigger manually
inputs:
irs-host:
type: choice
description: IRS environment to test
default: 'https://irs-full.dev.demo.catena-x.net'
required: true
options:
- 'https://irs-full.dev.demo.catena-x.net'
- 'https://irs.dev.demo.catena-x.net'
- 'https://irs.int.demo.catena-x.net'
test-cycles:
type: string
description: Number of Test Cycles
default: '20'
required: false
jobs:
check-config:
runs-on: ubuntu-latest
steps:
- name: Check if OAUTH2_CLIENT_TOKEN_URI is defined
run: |
if [[ -z "${{ secrets.OAUTH2_CLIENT_TOKEN_URI }}" ]]; then
echo "Error: Missing secret: Please configure OAUTH2_CLIENT_TOKEN_URI."
exit 1
fi
- name: Check if OAUTH2_CLIENT_SECRET is defined
run: |
if [[ -z "${{ secrets.OAUTH2_CLIENT_SECRET }}" ]]; then
echo "Error: Missing secret: Please configure OAUTH2_CLIENT_SECRET."
exit 1
fi
- name: Check if OAUTH2_CLIENT_ID is defined
run: |
if [[ -z "${{ secrets.OAUTH2_CLIENT_ID }}" ]]; then
echo "Error: Missing secret: Please configure OAUTH2_CLIENT_ID."
exit 1
fi
shell: bash
gatling-test:
needs: check-config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache maven packages
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run Gatling tests
env:
OAUTH2_HOST: ${{ secrets.OAUTH2_CLIENT_TOKEN_URI }}
OAUTH2_CLIENT_SECRET: ${{ secrets.OAUTH2_CLIENT_SECRET }}
OAUTH2_CLIENT_ID: ${{ secrets.OAUTH2_CLIENT_ID }}
IRS_HOST: ${{ github.event.inputs.irs-host || 'https://irs-full.dev.demo.catena-x.net' }}
TEST_CYCLES: ${{ github.event.inputs.test-cycles || '20' }}
run: |
mvn gatling:test -pl irs-load-tests
- name: Archive Report
uses: actions/upload-artifact@v4
with:
name: gatling-report
path: irs-load-tests/target/gatling/