fix(@angular/ssr): prevent stream draining if write
does not return…
#374
This file contains 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: CI | |
on: | |
push: | |
branches: | |
- main | |
- '[0-9]+.[0-9]+.x' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: {} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- 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 admin 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 | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Setup Bazel | |
uses: angular/dev-infra/github-actions/bazel/setup@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Setup Bazel RBE | |
uses: angular/dev-infra/github-actions/bazel/configure-remote@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Build release targets | |
run: pnpm ng-dev release build | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Setup Bazel | |
uses: angular/dev-infra/github-actions/bazel/setup@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Setup Bazel RBE | |
uses: angular/dev-infra/github-actions/bazel/configure-remote@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Run module and package tests | |
run: pnpm bazel test //modules/... //packages/... | |
env: | |
ASPECT_RULES_JS_FROZEN_PNPM_LOCK: '1' | |
e2e: | |
needs: test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: [20, 22] | |
subset: [npm, esbuild] | |
shard: [0, 1, 2, 3, 4, 5] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Setup Bazel | |
uses: angular/dev-infra/github-actions/bazel/setup@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Setup Bazel RBE | |
uses: angular/dev-infra/github-actions/bazel/configure-remote@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- 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/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }} | |
e2e_windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-2025] | |
node: [22] | |
subset: [npm, esbuild] | |
shard: [0, 1, 2, 3, 4, 5] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Run CLI E2E tests | |
uses: ./.github/shared-actions/windows-bazel-test | |
with: | |
test_target_name: e2e.${{ matrix.subset }}_node${{ matrix.node }} | |
env: | |
E2E_SHARD_TOTAL: 6 | |
E2E_SHARD_INDEX: ${{ matrix.shard }} | |
e2e-package-managers: | |
needs: test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: [22] | |
subset: [yarn, pnpm] | |
shard: [0, 1, 2] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Setup Bazel | |
uses: angular/dev-infra/github-actions/bazel/setup@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Setup Bazel RBE | |
uses: angular/dev-infra/github-actions/bazel/configure-remote@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- 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/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }} | |
e2e-snapshots: | |
needs: test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
node: [22] | |
subset: [npm, esbuild] | |
shard: [0, 1, 2, 3, 4, 5] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Setup Bazel | |
uses: angular/dev-infra/github-actions/bazel/setup@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Setup Bazel RBE | |
uses: angular/dev-infra/github-actions/bazel/configure-remote@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- 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/legacy-cli:e2e.snapshots.${{ matrix.subset }}_node${{ matrix.node }} | |
browsers: | |
needs: build | |
runs-on: ubuntu-latest | |
name: Browser Compatibility Tests | |
env: | |
SAUCE_TUNNEL_IDENTIFIER: angular-cli-${{ github.workflow }}-${{ github.run_number }} | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Setup Bazel | |
uses: angular/dev-infra/github-actions/bazel/setup@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Setup Bazel RBE | |
uses: angular/dev-infra/github-actions/bazel/configure-remote@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- name: Run E2E Browser tests | |
env: | |
SAUCE_USERNAME: ${{ vars.SAUCE_USERNAME }} | |
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }} | |
SAUCE_LOG_FILE: /tmp/angular/sauce-connect.log | |
SAUCE_READY_FILE: /tmp/angular/sauce-connect-ready-file.lock | |
SAUCE_PID_FILE: /tmp/angular/sauce-connect-pid-file.lock | |
SAUCE_TUNNEL_IDENTIFIER: 'angular-${{ github.run_number }}' | |
SAUCE_READY_FILE_TIMEOUT: 120 | |
run: | | |
./scripts/saucelabs/start-tunnel.sh & | |
./scripts/saucelabs/wait-for-tunnel.sh | |
pnpm bazel test --config=saucelabs //tests/legacy-cli:e2e.saucelabs | |
./scripts/saucelabs/stop-tunnel.sh | |
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1 | |
if: ${{ failure() }} | |
with: | |
name: sauce-connect-log | |
path: ${{ env.SAUCE_CONNECT_DIR_IN_HOST }}/sauce-connect.log | |
publish-snapshots: | |
needs: build | |
runs-on: ubuntu-latest | |
env: | |
CIRCLE_BRANCH: ${{ github.ref_name }} | |
steps: | |
- name: Initialize environment | |
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@b79ac7f5d6689becb7f2d559affbab5afb361389 | |
- name: Install node modules | |
run: pnpm install --frozen-lockfile | |
- name: Setup Bazel | |
uses: angular/dev-infra/github-actions/bazel/setup@f2a610b26cd7a451eddd50eb071dc495e3346a80 | |
- run: pnpm admin snapshots --verbose | |
env: | |
SNAPSHOT_BUILDS_GITHUB_TOKEN: ${{ secrets.SNAPSHOT_BUILDS_GITHUB_TOKEN }} |