Update bench.yml #4
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 | |
workflow_dispatch: | |
jobs: | |
bench: | |
name: Benchmark | |
strategy: | |
fail-fast: true | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: true | |
ref: ${{ github.head_ref }} | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
- name: Install required global packages | |
run: npm i -g bun npm-check-updates | |
- name: Update & install packages | |
run: | | |
ncu -u | |
bun i | |
npm rebuild @node-rs/argon2 argon2 bcrypt | |
- name: Node.js Benchmark | |
run: node node.index.js > ./results/node.txt | |
- name: Bun.sh Benchmark | |
run: bun --bun bun.index.js > ./results/bun.txt | |
- name: Commit changes | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |