Skip to content

Commit

Permalink
Try in gh comment
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Jan 20, 2025
1 parent 8b477a0 commit fa5c596
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/perfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ on:
jobs:
perf-tests:
runs-on: [ubuntu-latest]
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand All @@ -21,5 +23,21 @@ jobs:
- run: export DISPLAY=:99
- run: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- run:
node tests/performance/run.mjs -b $GITHUB_BASE_REF -u
https://github.com/canalplus/rx-player.git
node tests/performance/run.mjs --branch $GITHUB_BASE_REF --remote-git-url
https://github.com/canalplus/rx-player.git --report perf-report.md
- name: Post comment
if: always()
uses: actions/github-script@v7
with:
script: |
const { readFileSync, existsSync } = require('fs');
if (!existsSync("./perf-report.md")) {
return;
}
const fileContent = readFileSync("./perf-report.md").toString();
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Automated performance checks have found a sensible difference on commit \`${{github.event.pull_request.head.sha}}\` with the base branch \`${{github.base_ref}}\`:\n\n" + fileContent,
})

0 comments on commit fa5c596

Please sign in to comment.