Bump codecov/codecov-action from 4 to 5 in the dependencies group #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compare Branches | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_VERSION: "1.84.0" | |
jobs: | |
compare-and-report: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out PR (head) | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
path: pr_head | |
- name: Check out Base | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.base.ref }} | |
repository: ${{ github.event.pull_request.base.repo.full_name }} | |
path: base_branch | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ env.RUST_VERSION }} | |
- name: Run compare command | |
run: | | |
cd base_branch | |
./github/workflows/compare.sh | |
- name: Show debug | |
run: | | |
ls -l base_branch | |
cat base_branch/target/criterion/index.html || true | |
- name: Post report as PR comment | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const fs = require('fs'); | |
const reportBody = fs.readFileSync('base_branch/target/criterion/index.html', 'utf8'); | |
await github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: reportBody | |
}) |