Update benchmarks #115
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: Update benchmarks | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 0' | |
push: | |
branches: | |
- main | |
jobs: | |
run_benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
check-latest: true | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install the latest versions of each library | |
run: go get -u ./... && go mod tidy | |
- name: Install gobenchdata | |
run: go install go.bobheadxi.dev/gobenchdata@latest | |
- name: Benchmark Go Logging Libraries | |
run: go test -bench . -benchmem ./... | gobenchdata --json bench.json | |
- name: Install dependencies | |
working-directory: ./docs | |
run: npm install | |
- name: Bundle | |
working-directory: ./docs | |
run: npm run build:prod | |
- name: Commit benchmark results to repo | |
uses: EndBug/add-and-commit@v9 | |
with: | |
message: Update benchmark results | |
commit: '--no-verify' |