Bump actions/setup-node from 3 to 4 (#21) #88
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
name: Benchmark | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
benchmark: | |
name: Performance comparison | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
- name: Build | |
run: | | |
npm ci | |
npm run lint | |
npm run build | |
- name: Test | |
run: node test/index.js | |
- name: Reset | |
run: git reset --hard | |
- name: Benchmark hex parsing | |
run: node test/hexbench.js | tee output.txt | |
- name: Store hex parsing results | |
uses: rhysd/github-action-benchmark@v1 | |
with: | |
name: HEX parsing | |
# What benchmark tool the output.txt came from | |
tool: 'benchmarkjs' | |
# Where the output from the benchmark tool is stored | |
output-file-path: output.txt | |
# Personal access token to deploy GitHub Pages branch | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
# Push and deploy GitHub pages branch automatically | |
auto-push: true | |
- name: Benchmark against other libraries | |
run: node test/compare.js | tee output.txt | |
- name: Store compare results | |
uses: rhysd/github-action-benchmark@v1 | |
with: | |
name: Comparison | |
# What benchmark tool the output.txt came from | |
tool: 'benchmarkjs' | |
# Where the output from the benchmark tool is stored | |
output-file-path: output.txt | |
# Personal access token to deploy GitHub Pages branch | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
# Push and deploy GitHub pages branch automatically | |
auto-push: true |