[GitHub] Change total shard numbers and change job name (#5905)

This commit is contained in:
Sirz Benjie 2025-05-30 16:42:12 -05:00 committed by GitHub
parent 5eeff18407
commit e1be360e74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 6 deletions

View File

@ -19,19 +19,20 @@ on:
jobs: jobs:
test: test:
name: Shard ${{ inputs.shard }} of ${{ inputs.totalShards }} # We can't use dynmically named jobs until https://github.com/orgs/community/discussions/13261 is implemented
name: Shard
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ !inputs.skip }} if: ${{ !inputs.skip }}
steps: steps:
- name: Check out Git repository - name: Check out Git repository
uses: actions/checkout@v4.2.2 uses: actions/checkout@v4.2.2
with: with:
submodules: 'recursive' submodules: "recursive"
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version-file: '.nvmrc' node-version-file: ".nvmrc"
cache: 'npm' cache: "npm"
- name: Install Node.js dependencies - name: Install Node.js dependencies
run: npm ci run: npm ci
- name: Run tests - name: Run tests

View File

@ -34,10 +34,10 @@ jobs:
needs: check-path-change-filter needs: check-path-change-filter
strategy: strategy:
matrix: matrix:
shard: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] shard: [1, 2, 3, 4, 5]
uses: ./.github/workflows/test-shard-template.yml uses: ./.github/workflows/test-shard-template.yml
with: with:
project: main project: main
shard: ${{ matrix.shard }} shard: ${{ matrix.shard }}
totalShards: 10 totalShards: 5
skip: ${{ needs.check-path-change-filter.outputs.all != 'true'}} skip: ${{ needs.check-path-change-filter.outputs.all != 'true'}}