Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,12 @@ jobs:
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
node: ['20', '22', '24']
# 1-based index
shardIndex: [1, 2, 3]
shardTotal: [3]

name: Test (${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
name: Test (${{ matrix.os }}, ${{ matrix.node }})
runs-on: ${{ matrix.os }}

concurrency:
group: test-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
group: test-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }})
cancel-in-progress: true

steps:
Expand Down Expand Up @@ -170,7 +167,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Run tests
run: pnpm run ci --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
run: pnpm run ci

- name: Run example tests
if: ${{ matrix.node != '20' && matrix.os != 'windows-latest' }}
Expand All @@ -190,15 +187,12 @@ jobs:
matrix:
os: ['ubuntu-latest', 'windows-latest']
node: ['24']
# 0-based index
shardIndex: [0, 1, 2]
shardTotal: [3]

name: Test bin (${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
name: Test bin (${{ matrix.os }}, ${{ matrix.node }})
runs-on: ${{ matrix.os }}

concurrency:
group: test-egg-bin-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }}, ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
group: test-egg-bin-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }})
cancel-in-progress: true

steps:
Expand All @@ -221,10 +215,6 @@ jobs:
run: |
pnpm build --workspace ./tools/egg-bin
pnpm run --filter ./tools/egg-bin ci
env:
# https://github.com/jamiebuilds/ci-parallel-vars
CI_NODE_INDEX: ${{ matrix.shardIndex }}
CI_NODE_TOTAL: ${{ matrix.shardTotal }}

- name: Code Coverage
# skip on windows, it will hangup on codecov https://github.com/codecov/codecov-action/issues/1787
Expand Down
Loading