mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-14 19:38:49 +08:00
ffd75ebb5f
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
83 lines
2.1 KiB
YAML
83 lines
2.1 KiB
YAML
# This workflow runs benchmarks against the current branch,
|
|
# compares them to benchmarks against master,
|
|
# and uploads the results as an artifact.
|
|
|
|
name: benchstat
|
|
|
|
on: [pull_request]
|
|
|
|
jobs:
|
|
incoming:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
redis:
|
|
image: redis:7
|
|
ports:
|
|
- 6379:6379
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- name: Benchmark
|
|
run: go test -run=^$ -bench=. -count=5 -timeout=60m ./... | tee -a new.txt
|
|
- name: Upload Benchmark
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: bench-incoming
|
|
path: new.txt
|
|
|
|
current:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
redis:
|
|
image: redis:7
|
|
ports:
|
|
- 6379:6379
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: master
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- name: Benchmark
|
|
run: go test -run=^$ -bench=. -count=5 -timeout=60m ./... | tee -a old.txt
|
|
- name: Upload Benchmark
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: bench-current
|
|
path: old.txt
|
|
|
|
benchstat:
|
|
needs: [incoming, current]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: 1.23.x
|
|
- name: Install benchstat
|
|
run: go get -u golang.org/x/perf/cmd/benchstat
|
|
- name: Download Incoming
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: bench-incoming
|
|
- name: Download Current
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: bench-current
|
|
- name: Benchstat Results
|
|
run: benchstat old.txt new.txt | tee -a benchstat.txt
|
|
- name: Upload benchstat results
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: benchstat
|
|
path: benchstat.txt
|