-
Notifications
You must be signed in to change notification settings - Fork 138
57 lines (49 loc) · 1.53 KB
/
loadtest.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
name: CI Stage Load Test
on:
workflow_dispatch:
inputs:
users:
type: string
description: Number of Users
threads:
type: string
description: Number of threads
jobs:
load_test:
runs-on: ubuntu-latest
env:
ARTIFACT_DIR: ${{ github.workspace }}/tests/load-test/.artifacts
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up jq
run: |
sudo apt-get update
sudo apt-get install -y jq
- name: Prepare Load Test
working-directory: ./tests/load-tests
env:
STAGING_USERS_1: ${{ secrets.STAGING_USERS_1 }}
STAGING_USERS_2: ${{ secrets.STAGING_USERS_2 }}
STAGING_USERS_3: ${{ secrets.STAGING_USERS_3 }}
STAGING_USERS_4: ${{ secrets.STAGING_USERS_4 }}
run: ./ci-scripts/merge-json.sh $STAGING_USERS_1 $STAGING_USERS_2 $STAGING_USERS_3 $STAGING_USERS_4
- name: Run Load Test
working-directory: ./tests/load-tests
env:
USERS_PER_THREAD: ${{ github.event.inputs.users }}
THREADS: ${{ github.event.inputs.threads }}
run: ./run-stage.sh
- name: Collect results
working-directory: ./tests/load-tests
env:
OCP_TOKEN: ${{ secrets.OCP_TOKEN }}
STAGE_MEMBER_CLUSTER: ${{ secrets.STAGE_MEMBER_CLUSTER }}
run: |
./ci-scripts/stage/collect-results.sh .
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: rhtap-load-test-stage
path: |
${{ env.ARTIFACT_DIR }}