Skip to content

Remote Load

Remote Load #378

Workflow file for this run

# 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