-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (52 loc) · 1.74 KB
/
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
name: test
on:
workflow_dispatch:
inputs:
env_name:
description: "Environment name (e.g. develop, staging, or production)"
required: true
default: "develop"
kind:
description: "Kind of test (e.g. integration, or load)"
required: true
default: "integration"
jobs:
integration-test:
if: ${{ github.event.inputs.kind == 'integration' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python Environment
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install Python Test Dependencies
run: |
pip install -r src/tests/integration-test/requirements.txt
- name: Run Integration Test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: |
python src/tests/integration-test/test.py
load-test:
if: ${{ github.event.inputs.kind == 'load' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python Environment
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install Python Test Dependencies
run: |
pip install -r src/tests/load-test/requirements.txt
- name: Run Locust Load Test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
run: |
locust -f src/tests/load-test/locustfile.py \
--config src/tests/load-test/config.conf --print-stats