Bump golangci/golangci-lint-action from 3.4.0 to 3.5.0 (#47) #172
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 runs benchmarks against the current branch, compares them to benchmarks against | |
# main, and uploads the results as an artifact. Unlike in the Validate workflow we only test these | |
# benchmarks against the latest versions of Go and the Runner. | |
name: Benchstat | |
on: [push, pull_request] | |
jobs: | |
incoming: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Benchmark | |
run: | | |
for i in {1..5}; do | |
go test -run=XXX -bench=. | tee -a bench.txt | |
done | |
- name: Upload Benchmark | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bench-incoming | |
path: bench.txt | |
current: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Benchmark | |
run: | | |
for i in {1..5}; do | |
go test -run=XXX -bench=. | tee -a bench.txt | |
done | |
- name: Upload Benchmark | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bench-current | |
path: bench.txt | |
benchstat: | |
needs: [incoming, current] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: stable | |
- name: Install benchstat | |
run: go install golang.org/x/perf/cmd/benchstat@latest | |
- name: Download Incoming | |
uses: actions/download-artifact@v3 | |
with: | |
name: bench-incoming | |
- name: Download Current | |
uses: actions/download-artifact@v3 | |
with: | |
name: bench-current | |
- name: Benchstat Results | |
run: benchstat bench-current/bench.txt bench-incoming/bench.txt | tee -a benchstat.txt | |
- name: Upload benchstat results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: benchstat | |
path: benchstat.txt |