2020-05-16 05:02:36 +02:00
|
|
|
on: [push]
|
2020-05-09 15:15:34 +02:00
|
|
|
name: Benchmark
|
|
|
|
jobs:
|
|
|
|
Compare:
|
2020-05-12 23:05:07 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-05-09 15:15:34 +02:00
|
|
|
steps:
|
|
|
|
- name: Install Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
2020-05-16 05:02:36 +02:00
|
|
|
go-version: 1.14.x
|
2020-05-12 23:05:07 +02:00
|
|
|
- name: Fetch Repository
|
2020-05-09 15:15:34 +02:00
|
|
|
uses: actions/checkout@v2
|
2020-05-12 23:05:07 +02:00
|
|
|
- name: Run Benchmark
|
2020-06-30 00:54:40 +02:00
|
|
|
run: go test ./... -benchmem -run=^$ -bench . | tee output.txt
|
2020-05-12 23:05:07 +02:00
|
|
|
- name: Get Previous Benchmark Results
|
2020-05-13 00:32:25 +02:00
|
|
|
uses: actions/cache@v1
|
2020-05-09 15:15:34 +02:00
|
|
|
with:
|
2020-05-13 00:32:25 +02:00
|
|
|
path: ./cache
|
|
|
|
key: ${{ runner.os }}-benchmark
|
2020-05-13 00:39:51 +02:00
|
|
|
- name: Save Benchmark Results
|
2020-05-09 15:15:34 +02:00
|
|
|
uses: rhysd/github-action-benchmark@v1
|
|
|
|
with:
|
|
|
|
tool: 'go'
|
2020-05-13 03:02:37 +02:00
|
|
|
output-file-path: output.txt
|
2020-05-13 20:21:49 +02:00
|
|
|
github-token: ${{ secrets.BENCHMARK_TOKEN }}
|
2020-05-09 15:15:34 +02:00
|
|
|
fail-on-alert: true
|
2020-05-12 23:53:55 +02:00
|
|
|
comment-on-alert: true
|
2020-05-13 03:02:37 +02:00
|
|
|
auto-push: true
|