From ec7aec5e45f066f27a01e143d77fa726adfb540c Mon Sep 17 00:00:00 2001 From: Masaaki Goshima Date: Sun, 9 May 2021 13:47:38 +0900 Subject: [PATCH] Fix benchmark job --- .github/workflows/go.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c8a76d7..4f4d9f7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -39,10 +39,20 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.16 - - name: checkout + - name: checkout ( feature ) uses: actions/checkout@v2 - - name: run benchmark - run: cd benchmarks && go test -bench . + - name: run benchmark ( feature ) + 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: name: Coverage runs-on: ubuntu-latest