-
Notifications
You must be signed in to change notification settings - Fork 73
114 lines (107 loc) · 3.09 KB
/
perf-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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: 🌊 Ocean Core Performance Tests
on:
workflow_dispatch:
inputs:
batch_size:
type: choice
description: Batch size of requests against fake 3rd party API
default: "1000"
options:
- "10"
- "100"
- "200"
- "500"
- "1000"
entity_kb_size:
type: choice
description: Entity size in kb
default: "1"
options:
- "1"
- "5"
- "10"
- "25"
- "100"
- "500"
third_party_latency_ms:
type: choice
description: Latency in ms to each 3rd party API call
default: "0"
options:
- "0"
- "5"
- "10"
- "25"
- "100"
- "200"
- "500"
entities_amount:
type: choice
description: Explicit amount of entities created
default: "500"
options:
- "10"
- "50"
- "200"
- "500"
- "2500"
- "5000"
- "10000"
- "20000"
- "25000"
- "35000"
ocean_log_level:
type: choice
default: 'INFO'
options:
- 'DEBUG'
- 'INFO'
description: Log level to use (defaults to INFO)
mock_port_api:
type: boolean
default: false
description: Mock the Port API instead of using the real one
jobs:
test:
name: 🌊 Ocean Performance Tests
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Install poetry
run: pipx install 'poetry>=1.0.0,<2.0.0'
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: 'poetry'
- name: Install dependencies
run: |
make install
- name: Run Performance Test
env:
PORT_CLIENT_ID: ${{ secrets.PORT_CLIENT_ID }}
PORT_CLIENT_SECRET: ${{ secrets.PORT_CLIENT_SECRET }}
PORT_BASE_URL: ${{ secrets.PORT_BASE_URL }}
SMOKE_TEST_SUFFIX: ${{ github.run_id }}
THIRD_PARTY_BATCH_SIZE: ${{ inputs.batch_size }}
THIRD_PARTY_LATENCY_MS: ${{ inputs.third_party_latency_ms }}
ENTITY_AMOUNT: ${{ inputs.entities_amount }}
ENTITY_KB_SIZE: ${{ inputs.entity_kb_size }}
OCEAN_LOG_LEVEL: ${{ inputs.ocean_log_level }}
MOCK_PORT_API: ${{ inputs.mock_port_api && '1' || '0' }}
run: |
./scripts/run-local-perf-test.sh
- name: Cleanup Smoke Test
if: always()
env:
PORT_CLIENT_ID: ${{ secrets.PORT_CLIENT_ID }}
PORT_CLIENT_SECRET: ${{ secrets.PORT_CLIENT_SECRET }}
PORT_BASE_URL: ${{ secrets.PORT_BASE_URL }}
SMOKE_TEST_SUFFIX: ${{ github.run_id }}
MOCK_PORT_API: ${{ inputs.mock_port_api && '1' || '0' }}
run: |
./scripts/clean-smoke-test.sh
- name: Publish Performance Test Summary
run: |
cat ./perf-test-results-${{ github.run_id }}.log.md >> ${GITHUB_STEP_SUMMARY}