fix(ci): stabilize native Windows coverage

This commit is contained in:
imccyu
2026-08-18 21:15:21 +08:00
parent ef75b6ff2f
commit 5ba9e50bb0
10 changed files with 25 additions and 17 deletions
+9 -1
View File
@@ -110,7 +110,15 @@ describe('gate graph validation', () => {
expect(byId.get('coverage')?.allowFailure).not.toBe(true)
expect(byId.get('coverage-exempt-heavy')?.allowFailure).not.toBe(true)
expect(observational).not.toHaveLength(0)
for (const gate of observational) expect(byId.get(gate.id)?.allowFailure).toBe(true)
for (const gate of observational) {
const completeGate = byId.get(gate.id)
expect(completeGate?.allowFailure).toBe(true)
expect(completeGate?.needs).toEqual(expect.arrayContaining([
'coverage',
'coverage-exempt-heavy',
...(gate.needs ?? []),
]))
}
})
it('applies one configured test and polling timeout to both coverage gates', () => {
+8 -2
View File
@@ -454,15 +454,21 @@ function ciWindowsBlockingGates(): Gate[] {
}
function ciWindowsCompleteGates(): Gate[] {
const coverage = coverageGates()
const coverageNeeds = coverage.map(gate => gate.id)
const observational = ciWindowsObservationalGates()
// The required production site replaces the observational MPA build; both
// VitePress modes write the same output directory and cannot overlap.
.filter(gate => gate.id !== 'build' && gate.id !== 'docs-site-build')
.map(gate => ({ ...gate, allowFailure: true }))
.map(gate => ({
...gate,
allowFailure: true,
needs: [...new Set([...coverageNeeds, ...(gate.needs ?? [])])],
}))
return [
pnpmScript('build', 'build'),
pnpmScript('windows-site', 'docs:build', { label: 'production site' }),
...coverageGates(),
...coverage,
...observational,
]
}