Add workflow #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: Build Examples | ||
on: | ||
pull_request: | ||
paths: | ||
- 'src/**' | ||
- 'package.json' | ||
- 'benchmark/**' | ||
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 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 | ||