implement enhancement point (#1465) #4709
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: Regression | |
on: | |
push: | |
branches-ignore: | |
- 'main' | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
regression: | |
if: github.ref != 'refs/heads/main' | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Regression | |
run: | | |
node .github/regression/regression.js | |
- name: Performance | |
run: | | |
cp .github/regression/performance.js ../../performance.js | |
npm run install && npm run link-local && npm run performance | |
cp build/performance/results.json ../../results_after.json | |
git checkout -f main | |
git reset --hard | |
git status | |
npm run install && npm run link-local && npm run performance | |
cp build/performance/results.json ../../results_before.json | |
- name: cat | |
run: | | |
cat ../../results_after.json | |
cat ../../results_before.json | |
- name: Build performance comment | |
run: | | |
cd .. && cd .. | |
ls -salh | |
node ./performance.js | |
- uses: jwalton/gh-find-current-pr@v1 | |
id: findPr | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo ${{ steps.findPr.outputs.pr }} | |
- name: Find Comment | |
if: steps.findPr.outputs.pr != '' | |
uses: peter-evans/find-comment@v3 | |
id: fc | |
with: | |
issue-number: '${{steps.findPr.outputs.pr}}' | |
body-includes: Performance test results | |
- run: echo ${{ steps.fc.outputs.comment-id }} | |
- name: Build body from file | |
if: steps.findPr.outputs.pr != '' | |
id: get-comment-body | |
run: | | |
ls -salh | |
cp comment-regression.txt ../../ | |
cd .. && cd .. | |
ls -salh | |
cat comment-regression.txt comment-performance.txt > body.txt | |
- name: Create comment | |
if: steps.findPr.outputs.pr != '' | |
uses: peter-evans/create-or-update-comment@v4 | |
id: create-comment | |
with: | |
issue-number: '${{steps.findPr.outputs.pr}}' | |
edit-mode: replace | |
comment-id: '${{steps.fc.outputs.comment-id}}' | |
body-path: ../../body.txt |