-
-
Notifications
You must be signed in to change notification settings - Fork 3
112 lines (87 loc) · 3.04 KB
/
remoteLoad.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
# NOTE: This test only checks number of lines in the test. This is lazy.
# It should check number of accepted commits but at the time
name: "Remote Load"
on:
schedule:
# 2am
- cron: '* 2 * * *'
# on: [push, pull_request]
jobs:
load:
name: LoadTest
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9.0.4
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install etherpad-load-test
run: pnpm install etherpad-load-test -g
- name: Install Cypress
run: pnpm install cypress -g
- name: Setup file system
run: mkdir cypress
- name: Setup file system
run: cd cypress && mkdir integration
- name: Grab Cypress test file
run: cd cypress/integration && wget https://raw.githubusercontent.com/ether/etherpad-lite/develop/src/tests/frontend/cypress/integration/test.js
- name: Modify test file to not target 9001
run: cd cypress/integration && sed 's/http:\/\/127.0.0.1:9001'//g test.js > test.js
- name: Run test against shard1
run: cypress run --config baseUrl=https://shard1.etherpad.com --config-file=false
- name: Run test against shard2
run: cypress run --config baseUrl=https://shard2.etherpad.com --config-file=false
- name: Run test against shard3
run: cypress run --config baseUrl=https://shard3.etherpad.com --config-file=false
- name: Load test
run: etherpad-loadtest https://shard.etherpad.com -d 15 > runner1.txt &
- name: Sleep for 2 seconds
uses: jakejarvis/wait-action@master
with:
time: '2s'
- name: Load test
run: etherpad-loadtest https://shard.etherpad.com -d 15 > runner2.txt &
- name: Sleep for 2 seconds
uses: jakejarvis/wait-action@master
with:
time: '2s'
- name: Load test
run: etherpad-loadtest https://shard.etherpad.com -d 15 > runner3.txt &
- name: Sleep for 30 seconds
uses: jakejarvis/wait-action@master
with:
time: '30s'
- name: runner1
uses: actions/upload-artifact@v3
with:
name: runner1
path: runner1.txt
- name: runner2
uses: actions/upload-artifact@v3
with:
name: runner2
path: runner2.txt
- name: runner3
uses: actions/upload-artifact@v3
with:
name: runner3
path: runner3.txt
- name: check runner1 has 4500+ lines
run: test $(cat runner1.txt | wc -l) -gt 3000
- name: check runner2 has 4500+ lines
run: test $(cat runner2.txt | wc -l) -gt 3000
- name: check runner3 has 4500+ lines
run: test $(cat runner3.txt | wc -l) -gt 3000