Skip to content

Add benchmark workflow #6

Add benchmark workflow

Add benchmark workflow #6

# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Run Benchmark Report
on:
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
benchmark:
name: PR Benchmark
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install
run: npm ci
- name: Run PR Benchmark
run: node ./benchmark/run-benchmark.js --json > pr-benchmark.json
- name: Checkout master
run: git checkout origin/master
- name: Run Master Benchmark
run: node ./benchmark/run-benchmark.js --json > main-benchmark.json
- name: Log Difference
run: node ./benchmark/make-benchmark-log.js