forked from CMU-313/cmu-313-s26-nodebb-spring-26-NodeBB
-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (76 loc) · 1.95 KB
/
Copy pathk6.yaml
File metadata and controls
83 lines (76 loc) · 1.95 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: Run k6
on:
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop
jobs:
protocol:
runs-on: ubuntu-latest
services:
redis:
image: "redis:8.0.1"
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
steps:
- uses: actions/checkout@v2
- run: cp install/package.json package.json
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: NPM Install
uses: bahmutov/npm-install@v1
with:
useLockFile: false
- name: Setup on Redis
env:
SETUP: >-
{
"url": "http://127.0.0.1:4567/forum",
"secret": "abcdef",
"admin:username": "admin",
"admin:email": "test@example.org",
"admin:password": "hAN3Eg8W",
"admin:password:confirm": "hAN3Eg8W",
"database": "redis",
"redis:host": "127.0.0.1",
"redis:port": 6379,
"redis:password": "",
"redis:database": 0
}
CI: >-
{
"host": "127.0.0.1",
"database": 1,
"port": 6379
}
run: |
node app --setup="${SETUP}" --ci="${CI}"
- name: Build NodeBB
run: ./nodebb build
- name: Start NodeBB server
run: |
./nodebb start
sleep 20
- uses: grafana/setup-k6-action@v1
- uses: grafana/run-k6-action@v1
with:
path: |
./test/load-test.js
- name: Stop NodeBB server
if: always()
run: ./nodebb stop