-
-
Notifications
You must be signed in to change notification settings - Fork 8
83 lines (78 loc) · 2.2 KB
/
Copy pathload.yml
File metadata and controls
83 lines (78 loc) · 2.2 KB
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
name: Load Test
on:
workflow_call:
inputs:
gitRef:
required: true
type: string
default: 'main'
description: 'The git ref to checkout'
node:
required: true
type: string
default: '24'
description: 'Node version to use, accepts semver ranges and some aliases like latest_lts'
test:
required: true
type: string
default: '@expressjs/perf-load-example'
overrides:
type: string
outputs:
runId:
description: "Run id for fetching artifacts"
value: ${{github.run_id}}
artifactName:
description: "Artifact name for results"
value: perf-load-test-${{github.run_id}}
workflow_dispatch:
inputs:
gitRef:
required: true
type: string
default: 'main'
description: 'The git ref to checkout'
node:
required: true
type: string
default: '24'
description: 'Node version to use, accepts semver ranges and some aliases like latest_lts'
test:
required: true
type: string
default: '@expressjs/perf-load-example'
overrides:
type: string
jobs:
load:
name: Load Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
ref: ${{inputs.gitRef}}
persist-credentials: false
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{inputs.node}}
- name: Install dependencies
run: npm install --ignore-scripts --include=dev
- name: Run load test
run: |
echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY"
npm run load -- \
--write \
--parallel \
--test="${{inputs.test}}" \
--node="${{inputs.node}}" \
--overrides="${{inputs.overrides || '{}'}}" \
>> "$GITHUB_STEP_SUMMARY"
echo "\`\`\`" >> "$GITHUB_STEP_SUMMARY"
- name: Upload results
id: upload-results
uses: actions/upload-artifact@v4
with:
name: perf-load-test-${{github.run_id}}
path: ./perf/load/*/results/result-*.json
retention-days: 1