diff --git a/.github/workflows/asv.yml b/.github/workflows/asv.yml index 977ae83..c9760b1 100644 --- a/.github/workflows/asv.yml +++ b/.github/workflows/asv.yml @@ -71,5 +71,18 @@ jobs: path: ~/.cache/pip key: ${{ runner.os }}-pip - name: Run comparison against main branch - run: asv compare --config $ASV_CONFIG_FILE -v main HEAD + run: asv compare --config $ASV_CONFIG_FILE main HEAD > results.txt + - name: Publish comment to PR + uses: actions/github-script@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + script: | + const fs = require('fs'); + const comment = fs.readFileSync('results.txt', 'utf-8'); + const { data } = await github.issues.createComment({ + ...context.repo, + issue_number: context.issue.number, + body: comment, + }); + console.log("Comment published:", data.html_url); \ No newline at end of file