From eb363183566a3ba45879de37791e294fd37a2332 Mon Sep 17 00:00:00 2001 From: Vojtech Vitek Date: Wed, 24 Jul 2024 19:28:06 +0200 Subject: [PATCH] Try to fix missing bench files --- .github/workflows/benchmark.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 413207d..dc6bf68 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -20,26 +20,26 @@ jobs: ref: master - name: Run benchmark (master) - run: go test -bench=. -benchtime=100x -benchmem | tee master.txt + run: go test -bench=. -benchtime=100x -benchmem | tee /tmp/master.txt - name: Git clone (PR) uses: actions/checkout@v4 - name: Run benchmark (PR) - run: go test -bench=. -benchtime=100x -benchmem | tee pr.txt + run: go test -bench=. -benchtime=100x -benchmem | tee /tmp/pr.txt - name: Install benchstat run: go install golang.org/x/perf/cmd/benchstat@latest - name: Run benchstat - run: benchstat master.txt pr.txt | tee result.txt + run: cd /tmp && benchstat master.txt pr.txt | tee /tmp/result.txt - name: Comment on PR with benchmark results uses: actions/github-script@v6 with: script: | const fs = require('fs'); - const results = fs.readFileSync('result.txt', 'utf8'); + const results = fs.readFileSync('/tmp/result.txt', 'utf8'); const issue_number = context.payload.pull_request.number; const { owner, repo } = context.repo;