chore: fix flaky smokes #4207
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: Performance Benchmark | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| CI: true | |
| REDOCLY_TELEMETRY: off | |
| jobs: | |
| historical-versions: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Install External | |
| run: npm i -g hyperfine | |
| - name: Add more versions to test | |
| # Run only on the release branch (changeset-release/main): | |
| if: github.head_ref == 'changeset-release/main' | |
| run: | | |
| cd tests/performance/ | |
| cat package.json | jq ".dependencies = $(cat package.json | jq ._enhancedDependencies)" > package.json | |
| cat package.json | |
| - name: Prepare | |
| run: | | |
| npm run compile | |
| npm run pack:prepare | |
| cd tests/performance/ | |
| npm i | |
| npm run make-test | |
| - name: Run Benchmark | |
| run: | | |
| cd tests/performance/ | |
| npm run test # This command is generated and injected into package.json in the previous step. | |
| cat benchmark_check.md | |
| npm run chart # Creates benchmark_chart.md with the performance bar chart. | |
| - name: Comment PR | |
| if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | |
| uses: thollander/actions-comment-pull-request@v2 | |
| with: | |
| filePath: tests/performance/benchmark_chart.md | |
| comment_tag: historical-versions-comparison |