test(ci): preserve worker limits with required publisher smoke

This commit is contained in:
winewill committed 2026-11-05 17:49:30 +08:00
1 parent 939d83ab9c
commit fe91df778b
3 files changed
+17 -9

No files matched your search

+2 -1
View File
@@ -48,7 +48,7 @@ jobs:
- uses: pnpm/[email protected]
with:
package_json_file: publisher-isolated/package.json
dest: ${{ runner.temp }}/setup-pnpm-publisher-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
dest: ${{ runner.temp }}/setup-pnpm-js-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
- name: Install only publisher production dependencies
working-directory: publisher-isolated
run: pnpm --filter @deepseek-ai/dsh-desktop-publisher --fail-if-no-match install --prod --frozen-lockfile --ignore-scripts
@@ -63,6 +63,7 @@ jobs:
# Blacksmith uses 2 vCPU for file-serial native tests and 16 for coverage
# and the shared build/observational workspace.
windows-build:
needs: windows-publisher
if: github.event_name == 'pull_request'
runs-on: >-
${{ vars.DSH_CI_FAILOVER_WINDOWS == 'blacksmith' && 'blacksmith-16vcpu-windows-2025'
+3 -1
View File
@@ -21,6 +21,7 @@ concurrency:
jobs:
publisher-isolated:
strategy:
max-parallel: 1
fail-fast: false
matrix:
os: [linux, macos]
@@ -46,7 +47,7 @@ jobs:
- uses: pnpm/[email protected]
with:
package_json_file: publisher-isolated/package.json
dest: ${{ runner.temp }}/setup-pnpm-publisher-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
dest: ${{ runner.temp }}/setup-pnpm-${{ github.run_id }}-${{ github.run_attempt }}
- name: Install only publisher production dependencies
working-directory: publisher-isolated
run: pnpm --filter @deepseek-ai/dsh-desktop-publisher --fail-if-no-match install --prod --frozen-lockfile --ignore-scripts
@@ -494,6 +495,7 @@ jobs:
node-compat:
needs: publisher-isolated
if: github.event_name == 'pull_request'
# Under the selfhosted leg this job admits only repository-owned PR code
# to the persistent shared VM; the blacksmith branch targets ephemeral
+12 -7
View File
@@ -41,12 +41,17 @@ describe('CI workflow', () => {
})
expect(workflowJob(ci, 'all-checks-passed').needs).toContain('node-compat')
const ordinaryJobs = Object.entries(ci.jobs)
.filter(([name]) => !['node-compat', 'all-checks-passed'].includes(name))
.filter(([name]) => !['node-compat', 'all-checks-passed', 'publisher-isolated'].includes(name))
for (const [name, job] of ordinaryJobs) {
if (!isRecord(job)) throw new TypeError(`${name} must define a job`)
expect(job).not.toHaveProperty('strategy')
expect(job).not.toHaveProperty('uses')
}
// Publisher smoke reuses the compatibility/build concurrency slots before those jobs start.
expect(compatibility.needs).toBe('publisher-isolated')
expect(workflowJob(ci, 'publisher-isolated').strategy).toMatchObject({ 'max-parallel': 1, matrix: { os: ['linux', 'macos'] } })
expect(workflowJob(ciWindows, 'windows-build').needs).toBe('windows-publisher')
expect(workflowJob(ciWindows, 'windows-publisher').defaults).toEqual({ run: { shell: 'pwsh' } })
// Python reports its own required verdict, so neither its jobs nor a
// reusable workflow caller remain in the Linux or Windows workflow.
expect(Object.keys(ci.jobs).filter(name => name.startsWith('python'))).toEqual([])
@@ -60,7 +65,7 @@ describe('CI workflow', () => {
expect(runtime.with).toMatchObject({ targets: 'node24-linux-x64,node24-win-x64' })
expect(runtime.uses).toBe('./.github/workflows/build-exe-for-python-sdk.yml')
const windowsJobs = Object.entries(ciWindows.jobs)
.filter(([name]) => name !== 'windows-checks-passed')
.filter(([name]) => !['windows-checks-passed', 'windows-publisher'].includes(name))
for (const [name, job] of windowsJobs) {
if (!isRecord(job)) throw new TypeError(`${name} must define a job`)
expect(job).not.toHaveProperty('strategy')
@@ -95,7 +100,7 @@ describe('CI workflow', () => {
expect(afterSdk).toBeLessThanOrEqual(11)
})
it('keeps the union of required PR verdicts equal to the pre-split blocking set', () => {
it('keeps required PR verdicts covering runtime and publisher jobs', () => {
const verdicts = [
['ci.yml', 'all-checks-passed'],
['ci-windows.yml', 'windows-checks-passed'],
@@ -112,9 +117,7 @@ describe('CI workflow', () => {
expect(verdict.needs.every(id => typeof id === 'string' && id in jobs)).toBe(true)
blocking.push(...(verdict.needs as string[]))
}
// Splitting the workflows only moves jobs between verdicts; the blocking
// set itself must stay identical, or branch protection would accept a
// failure it rejected before the split.
// Every blocking lane must contribute to a branch-protection verdict.
expect(blocking.sort()).toEqual([
'node-24',
'node-24-bench',
@@ -122,10 +125,12 @@ describe('CI workflow', () => {
'node-24-coverage',
'node-24-lint',
'node-compat',
'publisher-isolated',
'python-runtime',
'python-sdk',
'windows-build',
'windows-native-tests',
'windows-publisher',
])
})
@@ -547,7 +552,7 @@ describe('CI workflow', () => {
expect(aggregate.needs).not.toContain('windows')
// windows-coverage is temporarily non-blocking while Windows ACP
// half-close tests are stabilized; observational stays out too.
expect(windowsAggregate.needs).toEqual(['windows-build', 'windows-native-tests'])
expect(windowsAggregate.needs).toEqual(['windows-publisher', 'windows-build', 'windows-native-tests'])
expect(windowsAggregate.name).toBe('windows checks passed')
expect(windowsAggregate['runs-on']).toBe(aggregate['runs-on'])
expect(windowsAggregate.if).toBe(aggregate.if)