fix: ci

fix: ci
This commit is contained in:
imccyu authored and imccyu committed 2026-08-21 14:11:06 +08:00
1 parent f4b080ffe0
commit 60e44b2d78
2 files changed
+8 -10

No files matched your search

+1 -3
View File
@@ -436,9 +436,7 @@ jobs:
- uses: pnpm/action-setup@v4
with:
dest: ${{ runner.temp }}/setup-pnpm
# Exercise package-script re-entry through the native pnpm.exe distribution.
standalone: true
dest: ${{ runner.temp }}/setup-pnpm-js
- uses: actions/setup-node@v6
with:
+7 -7
View File
@@ -5,6 +5,7 @@ import { describe, expect, it } from 'vitest'
const root = resolve(import.meta.dirname, '..')
const runnerPrivatePnpmDestination = '${{ runner.temp }}/setup-pnpm'
const nativeWindowsPnpmDestination = '${{ runner.temp }}/setup-pnpm-js'
describe('CI workflow', () => {
it('isolates every pnpm action setup destination per runner', () => {
@@ -25,8 +26,13 @@ describe('CI workflow', () => {
expect(setups.length).toBeGreaterThan(0)
for (const { jobName, step } of setups) {
expect(step, `${jobName} must not share pnpm/action-setup's default destination`).toMatchObject({
with: { dest: runnerPrivatePnpmDestination },
with: {
dest: jobName === 'windows-native'
? nativeWindowsPnpmDestination
: runnerPrivatePnpmDestination,
},
})
if (jobName === 'windows-native') expect(step).not.toMatchObject({ with: { standalone: true } })
}
})
@@ -81,12 +87,6 @@ describe('CI workflow', () => {
DSH_COVERAGE_TEST_TIMEOUT_MS: '30000',
})
const nativeSteps = windowsNative.steps as unknown[]
const nativePnpmSetup = nativeSteps.find(step => (
isRecord(step)
&& typeof step.uses === 'string'
&& step.uses.startsWith('pnpm/action-setup@')
))
expect(nativePnpmSetup).toMatchObject({ with: { standalone: true } })
const nativeCommandSteps = nativeSteps.filter((step): step is Record<string, unknown> & { run: string } => (
isRecord(step) && typeof step.run === 'string'
))