name: Pull Request on: pull_request: types: [opened, synchronize, reopened] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true permissions: {} defaults: run: shell: bash jobs: analyze: runs-on: ubuntu-latest outputs: snapshots: ${{ steps.filter.outputs.snapshots }} steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false - uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1 id: filter with: filters: | snapshots: - 'tests/e2e/ng-snapshot/package.json' lint: runs-on: ubuntu-latest steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup ESLint Caching uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 with: path: .eslintcache key: ${{ runner.os }}-${{ hashFiles('.eslintrc.json') }} - name: Install node modules run: pnpm install --frozen-lockfile - name: Generate JSON schema types # Schema types are required to correctly lint the TypeScript code run: pnpm run build-schema - name: Run ESLint run: pnpm lint --cache-strategy content - name: Validate NgBot Configuration run: pnpm ng-dev ngbot verify - name: Validate Circular Dependencies run: pnpm ts-circular-deps check - name: Run Validation run: pnpm admin validate - name: Check tooling setup run: pnpm check-tooling-setup - name: Check commit message # Commit message validation is only done on pull requests as its too late to validate once # it has been merged. run: pnpm ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} - name: Check code format # Code formatting checks are only done on pull requests as its too late to validate once # it has been merged. run: pnpm ng-dev format changed --check ${{ github.event.pull_request.base.sha }} - name: Check Package Licenses uses: angular/dev-infra/github-actions/linting/licenses@ba726e7bca0b08b125ccc6f93c233749e1213c17 build: runs-on: ubuntu-latest steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel RBE uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Install node modules run: pnpm install --frozen-lockfile - name: Build release targets run: pnpm ng-dev release build - name: Store PR release packages uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: packages path: dist/releases/*.tgz retention-days: 14 test: needs: build runs-on: ubuntu-latest steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel RBE uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Install node modules run: pnpm install --frozen-lockfile - name: Run module and package tests run: pnpm bazel test -- //... -//tests/... e2e: needs: build strategy: fail-fast: false matrix: node: [22] subset: [esbuild, webpack] shard: [0, 1, 2, 3, 4, 5] runs-on: ubuntu-latest steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Install node modules run: pnpm install --frozen-lockfile - name: Setup Bazel uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel RBE uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Run CLI E2E tests run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests:e2e.${{ matrix.subset }}_node${{ matrix.node }} build-e2e-windows-subset: runs-on: ubuntu-latest steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel RBE uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Install node modules run: pnpm install --frozen-lockfile - name: Build E2E tests for Windows on Linux run: | pnpm bazel build \ --config=e2e \ //tests:e2e.esbuild_node24 \ --platforms=tools:windows_x64 - name: Store built Windows E2E tests uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: win-e2e-build-artifacts path: | dist/bin/tests/** !**/node_modules/** retention-days: 1 if-no-files-found: 'error' e2e-windows-subset: needs: build-e2e-windows-subset runs-on: windows-2025 steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Install node modules run: pnpm install --frozen-lockfile - name: Download built Windows E2E tests uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: win-e2e-build-artifacts path: dist/bin/tests/ - name: Run CLI E2E tests uses: ./.github/shared-actions/windows-bazel-test with: test_target_name: e2e.esbuild_node24 env: E2E_SHARD_TOTAL: 1 TESTBRIDGE_TEST_ONLY: tests/basic/{build,rebuild,serve}.ts e2e-package-managers: needs: build strategy: fail-fast: false matrix: node: [22] subset: [yarn, pnpm, bun] shard: [0, 1, 2] runs-on: ubuntu-latest steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Install node modules run: pnpm install --frozen-lockfile - name: Setup Bazel uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel RBE uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Run CLI E2E tests run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=3 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests:e2e.${{ matrix.subset }}_node${{ matrix.node }} e2e-snapshots: needs: [analyze, build] if: needs.analyze.outputs.snapshots == 'true' strategy: fail-fast: false matrix: node: [22] subset: [esbuild, webpack] shard: [0, 1, 2, 3, 4, 5] runs-on: ubuntu-latest steps: - name: Initialize environment uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Install node modules run: pnpm install --frozen-lockfile - name: Setup Bazel uses: angular/dev-infra/github-actions/bazel/setup@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Setup Bazel RBE uses: angular/dev-infra/github-actions/bazel/configure-remote@ba726e7bca0b08b125ccc6f93c233749e1213c17 - name: Run CLI E2E tests run: pnpm bazel test --test_env=E2E_SHARD_TOTAL=6 --test_env=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests:e2e.snapshots.${{ matrix.subset }}_node${{ matrix.node }}