Modernize Benchmarks CI
This commit is contained in:
27
.github/workflows/benchmark.yml
vendored
27
.github/workflows/benchmark.yml
vendored
@@ -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"
|
||||
|
Reference in New Issue
Block a user