feat: openapi typescript client #6449
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install pnpm for Rebilly/api-definitions | |
| uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0 | |
| with: | |
| run_install: false | |
| version: 10.33.0 | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| 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_bundle.md benchmark_lint.md benchmark_check-config.md | |
| npm run chart # Creates benchmark_chart.md with the performance bar chart. | |
| # Same-repo PRs (incl. the bot release PR, which gets no workflow_run event) comment inline. | |
| - name: Comment PR | |
| if: github.event.pull_request.head.repo.full_name == github.repository | |
| uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b # v3.0.1 | |
| with: | |
| file-path: tests/performance/benchmark_chart.md | |
| comment-tag: historical-versions-comparison | |
| # Forks get a read-only token, so they hand off via artifact for performance-comment.yaml. | |
| - name: Save PR number | |
| if: github.event.pull_request.head.repo.full_name != github.repository | |
| run: echo "${{ github.event.number }}" > tests/performance/pr-number.txt | |
| - name: Upload benchmark result | |
| if: github.event.pull_request.head.repo.full_name != github.repository | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
| with: | |
| name: performance-benchmark | |
| path: | | |
| tests/performance/benchmark_chart.md | |
| tests/performance/pr-number.txt |