Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Update go.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
rlespinasse committed Oct 1, 2020
1 parent edaf7f1 commit b2ee8fa
Showing 1 changed file with 29 additions and 9 deletions.
38 changes: 29 additions & 9 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
Expand All @@ -25,11 +24,32 @@ jobs:
- name: Test
run: make test

- name: Bench
run: make bench | tee bench-output.txt

- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
tool: 'go'
output-file-path: bench-output.txt
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Run benchmark
run: go test -bench 'Benchmark' | tee output.txt

- name: Download previous benchmark data
uses: actions/cache@v1
with:
path: ./cache
key: ${{ runner.os }}-benchmark

- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
tool: 'go'
output-file-path: output.txt
external-data-json-path: ./cache/benchmark-data.json
fail-on-alert: true

0 comments on commit b2ee8fa

Please sign in to comment.