Fix TOB-25: validate ECDSA edge cases and add regression tests #75
Workflow file for this run
This file contains hidden or 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: Benchmark Comparison | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| benchmarks: | |
| name: Benchmarks (Node 22) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build PR branch | |
| run: npm run build | |
| - name: Run PR benchmarks | |
| run: node scripts/run-benchmarks.js --repo . --output pr-benchmarks.json | |
| - name: Checkout master baseline | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| path: master | |
| - name: Install dependencies (master) | |
| working-directory: master | |
| run: npm ci | |
| - name: Build master | |
| working-directory: master | |
| run: npm run build | |
| - name: Run master benchmarks | |
| run: node scripts/run-benchmarks.js --repo master --output master-benchmarks.json | |
| - name: Capture baseline sha | |
| id: baseline_sha | |
| run: echo "value=$(cd master && git rev-parse HEAD)" >> "$GITHUB_OUTPUT" | |
| - name: Generate benchmark report | |
| run: > | |
| node scripts/format-benchmark-comment.js | |
| --baseline master-benchmarks.json | |
| --branch pr-benchmarks.json | |
| --output benchmark-report.md | |
| --branch-ref $GITHUB_SHA | |
| --baseline-ref ${{ steps.baseline_sha.outputs.value }} | |
| - name: Upload benchmark artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: benchmark-results | |
| path: | | |
| pr-benchmarks.json | |
| master-benchmarks.json | |
| benchmark-report.md | |
| - name: Comment on PR | |
| if: github.event.pull_request.number != '' | |
| uses: actions/github-script@v7 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const fs = require('fs'); | |
| const body = fs.readFileSync('benchmark-report.md', 'utf8'); | |
| await github.rest.issues.createComment({ | |
| ...context.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body | |
| }); |