name: Build and Test on: push: branches: [main] pull_request: branches: [main] 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: Verify packed packages (manifests and built output) run: pnpm run verify:manifests - 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' run: pnpm measure --save && pnpm update-readme - name: Commit size updates if: github.ref == 'refs/heads/main' 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)