Fix benchmark job

This commit is contained in:
Masaaki Goshima 2021-05-09 13:47:38 +09:00
parent 33f2568d47
commit ec7aec5e45
1 changed files with 13 additions and 3 deletions

View File

@ -39,10 +39,20 @@ jobs:
uses: actions/setup-go@v2 uses: actions/setup-go@v2
with: with:
go-version: 1.16 go-version: 1.16
- name: checkout - name: checkout ( feature )
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: run benchmark - name: run benchmark ( feature )
run: cd benchmarks && go test -bench . run: cd benchmarks && go test -bench GoJson | tee $HOME/new.txt
- name: install benchcmp
run: go get -u golang.org/x/tools/cmd/benchcmp
- name: checkout ( master )
uses: actions/checkout@v2
with:
ref: master
- name: run benchmark ( master )
run: cd benchmarks && go test -bench GoJson | tee $HOME/old.txt
- name: compare benchmark results
run: benchcmp $HOME/old.txt $HOME/new.txt
coverage: coverage:
name: Coverage name: Coverage
runs-on: ubuntu-latest runs-on: ubuntu-latest