Added annotation #2602
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: Build and Test | |
| on: | |
| push: | |
| branches: [main, next] | |
| pull_request: | |
| branches: [main, next] | |
| jobs: | |
| build-test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v6 | |
| - name: Setup Node.js environment | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build all packages | |
| run: pnpm build | |
| - name: Lint | |
| # Will run the step even if build step failed | |
| if: success() || failure() | |
| run: pnpm lint | |
| - name: Test all packages | |
| # Will run the step even if lint step failed | |
| if: success() || failure() | |
| run: pnpm test | |
| - name: Measure bundle sizes | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' | |
| run: pnpm measure --save && pnpm update-readme | |
| - name: Commit size updates | |
| if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git diff --quiet || (git commit -am "chore: update bundle sizes [skip ci]" && git push) |