cleanup, no changes to logic #3946
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: test | |
on: | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
unit: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- run: npm install | |
- run: npm test | |
integration: | |
needs: unit | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
env: | |
HTTP_BIN_HOST: http://localhost:8080 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- run: docker run -d -p8080:80 kennethreitz/httpbin | |
- run: npm install | |
- run: npm run integration | |
performance: | |
needs: unit | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Performance After | |
run: | | |
npm install && npm run performance | |
cp results.json results_after.json | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
path: before | |
- name: Performance Before | |
run: | | |
rm -rf src | |
cp -rf before/src src | |
git status | |
npm install && npm run performance | |
cp results.json results_before.json | |
- name: cat and build comment | |
run: | | |
cat results_after.json | |
cat results_before.json | |
node ./test/performance_comment.mjs | |
- 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: 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: comment-performance.txt |