Modernize Benchmarks CI

This commit is contained in:
Fedor Indutny
2021-08-11 12:29:07 -07:00
committed by GitHub
parent 12c78c742f
commit 61b7eebfcf
17 changed files with 149 additions and 58 deletions

View File

@@ -23,6 +23,7 @@ jobs:
with:
repository: 'signalapp/Mock-Signal-Server-Private'
path: 'Mock-Server'
ref: 'alpha'
token: ${{ secrets.AUTOMATED_GITHUB_PAT }}
- name: Setup node.js
@@ -56,21 +57,40 @@ jobs:
run: yarn build:webpack
- name: Copy CI configuration
run: cp -rf ./Mock-Server/config/local-development.json ./config/
run: |
cp -rf ./Mock-Server/config/local-development.json \
./config/local-development.json
cp -rf ./config/local-development.json ./config/local-production.json
- name: Setup hosts
run: sudo echo "127.0.0.1 mock.signal.org" | sudo tee -a /etc/hosts
- name: Run benchmarks
- name: Run startup benchmarks
run: |
set -o pipefail
rm -rf /tmp/mock
xvfb-run --auto-servernum \
ts-node Mock-Server/scripts/load-test.ts ./node_modules/.bin/electron . | tee benchmark.log || \
(cat /home/runner/.config/Signal-mock/logs/{app,main}.log && exit 1)
(cat /tmp/mock/logs/{app,main}.log && exit 1)
timeout-minutes: 10
env:
NODE_ENV: production
RUN_COUNT: 10
ELECTRON_ENABLE_STACK_DUMPING: on
- name: Run send benchmarks
run: |
set -o pipefail
rm -rf /tmp/mock
xvfb-run --auto-servernum \
ts-node Mock-Server/scripts/send-test.ts ./node_modules/.bin/electron . | tee send-benchmark.log || \
(cat /tmp/mock/logs/{app,main}.log && exit 1)
timeout-minutes: 10
env:
NODE_ENV: production
RUN_COUNT: 100
ELECTRON_ENABLE_STACK_DUMPING: on
- name: Clone benchmark branch
uses: actions/checkout@v2
with:
@@ -83,6 +103,7 @@ jobs:
run: |
npm ci
node ./bin/collect.js ../benchmark.log data.json
node ./bin/collect.js ../send-benchmark.log send-data.json
npm run build
git config --global user.email "no-reply@signal.org"
git config --global user.name "Signal Bot"