Skip to content

Commit

Permalink
ci: split package managers and bundlers jobs
Browse files Browse the repository at this point in the history
Currently, the package managers subset includes 27 tests. However, these tests are divided into 6 shards, which leads to inefficient use of resources.
  • Loading branch information
alan-agius4 committed Jun 13, 2024
1 parent 44f9a11 commit c8e7c4a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 14 deletions.
36 changes: 23 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
node: [18, 20, 22]
subset: [npm, yarn, pnpm, esbuild]
subset: [npm, esbuild]
shard: [0, 1, 2, 3, 4, 5]
exclude:
# Skip yarn subset on Windows
Expand All @@ -90,18 +90,6 @@ jobs:
# Skip Node.js v20 tests on Windows
- os: windows-latest
node: 20
# Skip yarn subset on Node.js 20
- node: 20
subset: yarn
# Skip pnpm subset on Node.js 20
- node: 20
subset: pnpm
# Skip yarn subset on Node.js 18
- node: 18
subset: yarn
# Skip pnpm subset on Node.js 18
- node: 18
subset: pnpm
runs-on: ${{ matrix.os }}
steps:
- name: Initialize environment
Expand All @@ -115,6 +103,28 @@ jobs:
- name: Run CLI E2E tests
run: yarn bazel test --define=E2E_SHARD_TOTAL=6 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}

e2e-package-managers:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [22]
subset: [yarn, pnpm]
shard: [0, 1, 2]
exclude:
runs-on: ${{ matrix.os }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@03b8a7dffd1205e061f0bee949024ebefc2a6592
- name: Install node modules
run: yarn install --immutable
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@03b8a7dffd1205e061f0bee949024ebefc2a6592
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@03b8a7dffd1205e061f0bee949024ebefc2a6592
- name: Run CLI E2E tests
run: yarn bazel test --define=E2E_SHARD_TOTAL=3 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}

e2e-snapshots:
strategy:
fail-fast: false
Expand Down
24 changes: 23 additions & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
matrix:
os: [ubuntu-latest]
node: [22]
subset: [npm, yarn, pnpm, esbuild]
subset: [npm, esbuild]
shard: [0, 1, 2, 3, 4, 5]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -122,6 +122,28 @@ jobs:
- name: Run CLI E2E tests
run: yarn bazel test --define=E2E_SHARD_TOTAL=6 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}

e2e-package-managers:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [22]
subset: [yarn, pnpm]
shard: [0, 1, 2]
exclude:
runs-on: ${{ matrix.os }}
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@03b8a7dffd1205e061f0bee949024ebefc2a6592
- name: Install node modules
run: yarn install --immutable
- name: Setup Bazel
uses: angular/dev-infra/github-actions/bazel/setup@03b8a7dffd1205e061f0bee949024ebefc2a6592
- name: Setup Bazel RBE
uses: angular/dev-infra/github-actions/bazel/configure-remote@03b8a7dffd1205e061f0bee949024ebefc2a6592
- name: Run CLI E2E tests
run: yarn bazel test --define=E2E_SHARD_TOTAL=3 --define=E2E_SHARD_INDEX=${{ matrix.shard }} --config=e2e //tests/legacy-cli:e2e.${{ matrix.subset }}_node${{ matrix.node }}

e2e-snapshots:
needs: analyze
if: needs.analyze.outputs.snapshots == 'true'
Expand Down

0 comments on commit c8e7c4a

Please sign in to comment.