mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-08-29 04:26:38 +00:00
ci: isolate the Windows pnpm setup destination per job
The windows-* jobs keep a separate standalone pnpm executable under runner.temp/setup-pnpm-js. A previous job on the same self-hosted runner can leave a locked @reflink native module there, so the next job's pnpm/action-setup fails with EPERM during unlink before any test runs. Suffix the destination with run_id, run_attempt, and job so every job gets a fresh directory even when sequential jobs land on the same runner; apply the same to the python SDK exe build. Update the pnpm setup isolation note to record the Windows-specific destination.
This commit is contained in:
@@ -5,7 +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'
|
||||
const nativeWindowsPnpmDestination = '${{ runner.temp }}/setup-pnpm-js-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}'
|
||||
|
||||
describe('CI workflow', () => {
|
||||
it('isolates every pnpm action setup destination per runner', () => {
|
||||
@@ -36,6 +36,25 @@ describe('CI workflow', () => {
|
||||
}
|
||||
})
|
||||
|
||||
it('isolates the python SDK exe pnpm setup destination per job', () => {
|
||||
const workflow: unknown = yaml.load(readFileSync(resolve(root, '.github/workflows/build-exe-for-python-sdk.yml'), 'utf8'))
|
||||
if (!isRecord(workflow) || !isRecord(workflow.jobs)) throw new TypeError('build-exe-for-python-sdk.yml must define jobs')
|
||||
const setups: Array<{ step: unknown }> = []
|
||||
for (const job of Object.values(workflow.jobs)) {
|
||||
if (!isRecord(job) || !Array.isArray(job.steps)) continue
|
||||
for (const step of job.steps) {
|
||||
if (!isRecord(step) || typeof step.uses !== 'string' || !step.uses.startsWith('pnpm/action-setup@')) continue
|
||||
setups.push({ step })
|
||||
}
|
||||
}
|
||||
expect(setups.length).toBeGreaterThan(0)
|
||||
for (const { step } of setups) {
|
||||
expect(step).toMatchObject({
|
||||
with: { dest: nativeWindowsPnpmDestination },
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
it('keeps required Wine and split native Windows jobs with failover, plus a master-only standby', () => {
|
||||
const workflow = loadWorkflow('.github/workflows/ci.yml')
|
||||
const masterWorkflow = loadWorkflow('.github/workflows/ci-master.yml')
|
||||
|
||||
Reference in New Issue
Block a user