github.com/expr-lang/expr@v1.16.9/.github/workflows/diff.yml (about) 1 name: diff 2 3 on: 4 pull_request: 5 branches: [ master ] 6 7 jobs: 8 bench: 9 runs-on: ubuntu-latest 10 steps: 11 - name: Setup Go 1.18 12 uses: actions/setup-go@v4 13 with: 14 go-version: 1.18 15 - name: Install benchstat 16 run: go install golang.org/x/perf/cmd/benchstat@latest 17 18 - uses: actions/checkout@v3 19 - name: Benchmark new code 20 run: go test -bench=. -benchmem -run=^$ -count=10 -timeout=30m | tee /tmp/new.txt 21 22 - name: Checkout master 23 uses: actions/checkout@v3 24 with: 25 ref: master 26 - name: Benchmark master 27 run: go test -bench=. -benchmem -run=^$ -count=10 -timeout=30m | tee /tmp/old.txt 28 29 - name: Diff 30 run: benchstat /tmp/old.txt /tmp/new.txt