pnpm(deps): bump react from 19.2.0 to 19.2.7 #413
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: Run Tests and Update Status | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| zone: [home, catalog, account, shared] | |
| env: | |
| NEXT_PUBLIC_HOME_URL: http://localhost:3000 | |
| NEXT_PUBLIC_HOME_ASSET_PREFIX: /home | |
| NEXT_PUBLIC_CATALOG_URL: http://localhost:3001 | |
| NEXT_PUBLIC_CATALOG_BASE_PATH: /catalog | |
| NEXT_PUBLIC_ACCOUNT_URL: http://localhost:3002 | |
| NEXT_PUBLIC_ACCOUNT_BASE_PATH: /account | |
| NEXT_PUBLIC_CATALOG_ASSET_PREFIX: /catalog | |
| NEXT_PUBLIC_ACCOUNT_ASSET_PREFIX: /account | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: 'pnpm' | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build shared package | |
| if: matrix.zone != 'shared' | |
| run: pnpm --filter "./shared" build | |
| - name: Build ${{ matrix.zone }} | |
| run: | | |
| if grep -q '"build"' "${{ matrix.zone }}/package.json"; then | |
| pnpm --filter "./${{ matrix.zone }}" build | |
| fi | |
| - name: Run architecture tests for ${{ matrix.zone }} | |
| id: arch-test | |
| continue-on-error: true | |
| run: pnpm --filter "./${{ matrix.zone }}" test:architecture | |
| - name: Run size check for ${{ matrix.zone }} | |
| id: size-check | |
| continue-on-error: true | |
| run: | | |
| if grep -q '"size"' "${{ matrix.zone }}/package.json"; then | |
| pnpm --filter "./${{ matrix.zone }}" size | |
| else | |
| exit 0 | |
| fi | |
| - name: Create test result file | |
| run: | | |
| echo "${{ matrix.zone }}:arch:${{ steps.arch-test.outcome }}" >> test-results.txt | |
| echo "${{ matrix.zone }}:size:${{ steps.size-check.outcome }}" >> test-results.txt | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.zone }} | |
| path: test-results.txt | |
| update-readme: | |
| needs: run-tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # pull_request checkouts are detached by default; check out the PR branch | |
| # so the README status commit can be pushed back. | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Download all test results | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: test-results | |
| - name: Generate test status section | |
| run: | | |
| echo "## Test Status" > temp-test-status.md | |
| echo "" >> temp-test-status.md | |
| echo "| Zone | Architecture Tests | Size Check |" >> temp-test-status.md | |
| echo "|------|-------------------|------------|" >> temp-test-status.md | |
| for zone in home catalog account shared; do | |
| arch_status=$(grep "$zone:arch:" test-results/test-results-$zone/test-results.txt | cut -d':' -f3) | |
| size_status=$(grep "$zone:size:" test-results/test-results-$zone/test-results.txt | cut -d':' -f3) | |
| arch_emoji="✅" | |
| if [ "$arch_status" != "success" ]; then | |
| arch_emoji="❌" | |
| fi | |
| size_emoji="✅" | |
| if [ "$size_status" != "success" ]; then | |
| size_emoji="❌" | |
| fi | |
| echo "| $zone | $arch_emoji | $size_emoji |" >> temp-test-status.md | |
| done | |
| - name: Update README.md with test status | |
| run: | | |
| awk ' | |
| BEGIN { p=1 } | |
| /^## Test Status/ { p=0; system("cat temp-test-status.md"); next } | |
| p { print } | |
| ' README.md > README.md.new | |
| mv README.md.new README.md | |
| rm temp-test-status.md | |
| - name: Commit and push if changed | |
| run: | | |
| git config --global user.name 'GitHub Action' | |
| git config --global user.email 'action@github.com' | |
| git add README.md | |
| if git diff --quiet && git diff --staged --quiet; then | |
| echo "No README changes" | |
| exit 0 | |
| fi | |
| git commit -m "Update test status" | |
| git push origin "HEAD:${{ github.head_ref || github.ref_name }}" |