chore(deps): bump next from 15.3.5 to 15.4.8 in /apps/pay-test-exchange #16468
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: Checks | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| branches: | |
| - main | |
| merge_group: | |
| # The merge queue provides the same benefits | |
| # as the Require branches to be up to date before merging branch protection, | |
| # but does not require a pull request author to update their pull | |
| # request branch and wait for status checks to finish before trying to merge. | |
| # See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| # Build against main to prime turbocache | |
| # GitHub Actions is branch-specific but falls | |
| # back to the default branch (main) if no | |
| # branch specific cache is found. | |
| - main | |
| permissions: | |
| pull-requests: write | |
| concurrency: | |
| # Support push/pr as event types with different behaviors each: | |
| # 1. push: queue up builds | |
| # 2. pr: only allow one run per PR | |
| group: ${{ github.workflow }}-${{ github.event.type }}${{ github.event.pull_request.number }} | |
| # If there is already a workflow running for the same pull request, cancel it | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| setup_and_build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| - name: setup-node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'pnpm' | |
| - name: install | |
| run: pnpm install --frozen-lockfile | |
| # Cache Turborepo's build outputs (.turbo directory). | |
| # This speeds up the 'pnpm build' step significantly if inputs haven't changed. | |
| # The key includes the OS and a hash of the lockfile, ensuring dependency changes | |
| # invalidate the cache. | |
| # The restore-key provides a fallback to the latest cache without the specific lockfile hash. | |
| # Running this on the target branch (e.g., 'main' via push or merge_group) aims to | |
| # populate a shared cache that subsequent PR/branch builds can use as a fallback, | |
| # further speeding up their builds if only a few packages changed. | |
| - name: Cache Turborepo cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: .turbo | |
| key: ${{ runner.os }}-turbo-build-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-turbo-build- | |
| - name: build | |
| run: pnpm build | |
| env: | |
| NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | |
| - name: Upload build artifacts | |
| if: github.event_name != 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-output | |
| path: | | |
| dist/ | |
| .next/ | |
| node_modules/ | |
| turbo/ | |
| packages/*/dist/ | |
| packages/*/.next/ | |
| apps/*/dist/ | |
| apps/*/.next/ | |
| .turbo/ | |
| retention-days: 1 | |
| # Create a separate artifact for node_modules to preserve symlinks and permissions | |
| - name: Upload node_modules | |
| if: github.event_name != 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: node-modules | |
| path: node_modules | |
| retention-days: 1 | |
| code_style: | |
| if: github.event_name != 'push' | |
| needs: setup_and_build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| strategy: | |
| matrix: | |
| style-command: | |
| - lint | |
| - prettier | |
| - typecheck | |
| - danger | |
| fail-fast: false | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| - name: setup-node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'pnpm' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-output | |
| - name: Download node_modules | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: node-modules | |
| path: node_modules | |
| # Restore executable permissions for binaries | |
| - name: Fix permissions | |
| run: chmod +x node_modules/*/bin/* | |
| - name: install | |
| run: pnpm install --frozen-lockfile | |
| - name: check | |
| run: pnpm ${{ matrix.style-command }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | |
| build_sample_apps: | |
| if: github.event_name != 'push' | |
| needs: setup_and_build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| - name: setup-node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'pnpm' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-output | |
| - name: Download node_modules | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: node-modules | |
| path: node_modules | |
| # Restore executable permissions for binaries | |
| - name: Fix permissions | |
| run: chmod +x node_modules/*/bin/* | |
| - name: install | |
| run: pnpm install --frozen-lockfile | |
| - name: build sample apps | |
| run: pnpm build:sample-apps | |
| env: | |
| NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | |
| test: | |
| if: github.event_name != 'push' | |
| needs: setup_and_build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| - name: setup-node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'pnpm' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-output | |
| - name: Download node_modules | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: node-modules | |
| path: node_modules | |
| # Restore executable permissions for binaries | |
| - name: Fix permissions | |
| run: chmod +x node_modules/*/bin/* | |
| - name: install | |
| run: pnpm install --frozen-lockfile | |
| - name: Test | |
| run: pnpm test:ci | |
| - name: Report | |
| if: always() | |
| uses: davelosert/vitest-coverage-report-action@v2 | |
| bundle_size: | |
| if: github.event_name != 'push' | |
| needs: setup_and_build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.sha }} | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| name: Install pnpm | |
| - name: setup-node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22.x | |
| cache: 'pnpm' | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: build-output | |
| - name: Download node_modules | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: node-modules | |
| path: node_modules | |
| - name: Fix permissions | |
| run: chmod +x node_modules/*/bin/* | |
| - name: install | |
| run: pnpm install --frozen-lockfile | |
| - name: Check bundle size | |
| id: size-limit | |
| run: | | |
| echo "## π¦ Bundle Size Report" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| # Run size-limit and capture output | |
| set +e | |
| pnpm size > size-output.txt 2>&1 | |
| SIZE_EXIT_CODE=$? | |
| set -e | |
| if [ $SIZE_EXIT_CODE -eq 0 ]; then | |
| echo "β All bundles are within size limits" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Bundle Sizes" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| cat size-output.txt >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| else | |
| echo "β Some bundles exceed size limits" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| cat size-output.txt >> $GITHUB_STEP_SUMMARY | |
| echo '```' >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| fi | |
| - name: Comment on PR | |
| if: always() && github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const fs = require('fs'); | |
| // Strip ANSI color codes | |
| function stripAnsi(str) { | |
| return str.replace(/\x1B\[[0-9;]*[a-zA-Z]/g, ''); | |
| } | |
| // Parse size-limit output into structured data | |
| function parseOutput(output) { | |
| const clean = stripAnsi(output); | |
| const lines = clean.split('\n'); | |
| const packages = []; | |
| let currentPackage = null; | |
| for (const line of lines) { | |
| // Check if this is a package name line (starts with emoji or has "limit:") | |
| if (line.trim() && !line.includes('Adding to') && !line.includes('Running JS')) { | |
| if (!line.startsWith(' ') && !line.includes('Size limit:')) { | |
| // New package | |
| if (currentPackage) packages.push(currentPackage); | |
| currentPackage = { name: line.trim(), details: [] }; | |
| } else if (currentPackage) { | |
| // Package detail line | |
| currentPackage.details.push(line.trim()); | |
| } | |
| } | |
| } | |
| if (currentPackage) packages.push(currentPackage); | |
| return packages; | |
| } | |
| let comment = '## π¦ Bundle Size Check\n\n'; | |
| try { | |
| const output = fs.readFileSync('size-output.txt', 'utf8'); | |
| const hasErrors = output.includes('exceeded') || output.includes('FAILED'); | |
| if (hasErrors) { | |
| comment += 'β **Some bundles exceed size limits**\n\n'; | |
| } else { | |
| comment += 'β **All bundles are within size limits**\n\n'; | |
| } | |
| const packages = parseOutput(output); | |
| if (packages.length > 0) { | |
| comment += '<details>\n<summary>π View detailed bundle sizes</summary>\n\n'; | |
| for (const pkg of packages) { | |
| comment += `\n**${pkg.name}**\n`; | |
| comment += '```\n'; | |
| comment += pkg.details.join('\n'); | |
| comment += '\n```\n'; | |
| } | |
| comment += '\n</details>'; | |
| } else { | |
| // Fallback to raw output if parsing fails | |
| comment += '<details>\n<summary>π View bundle sizes</summary>\n\n```\n'; | |
| comment += stripAnsi(output); | |
| comment += '\n```\n</details>'; | |
| } | |
| } catch (error) { | |
| comment += 'β οΈ Could not read bundle size output. Check the workflow logs.\n'; | |
| comment += `\nError: ${error.message}`; | |
| } | |
| // Find existing comment | |
| const { data: comments } = await github.rest.issues.listComments({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| }); | |
| const botComment = comments.find(comment => | |
| comment.user.type === 'Bot' && comment.body.includes('Bundle Size Check') | |
| ); | |
| if (botComment) { | |
| await github.rest.issues.updateComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: botComment.id, | |
| body: comment | |
| }); | |
| } else { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: comment | |
| }); | |
| } | |
| ui-test: | |
| if: github.event.pull_request.draft == false | |
| uses: ./.github/workflows/ui_tests.yml | |
| secrets: inherit | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| with: | |
| # Pass the SHA so the called workflow can check out a stable commit | |
| branch: ${{ github.sha }} | |
| build-and-cache-only: ${{ github.event_name == 'push' }} | |
| matrix_config: '{"shard":[1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "shardTotal":[10]}' | |
| build_trigger_type: ${{ github.event_name }} |