Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,12 @@ jobs:
NO_COLOR: true
HOME: '${{ runner.temp }}/qwen-ci-home'
USERPROFILE: '${{ runner.temp }}/qwen-ci-home'
# Bound each Vitest process on the shared ECS host. Operators can
# tune the maximum without changing this workflow.
VITEST_MAX_THREADS: "${{ startsWith(runner.name, 'ecs-qwen-') && (vars.QWEN_CI_VITEST_MAX_WORKERS || '4') || '' }}"
VITEST_MIN_THREADS: "${{ startsWith(runner.name, 'ecs-qwen-') && '1' || '' }}"
VITEST_MAX_FORKS: "${{ startsWith(runner.name, 'ecs-qwen-') && (vars.QWEN_CI_VITEST_MAX_WORKERS || '4') || '' }}"
VITEST_MIN_FORKS: "${{ startsWith(runner.name, 'ecs-qwen-') && '1' || '' }}"
OPENAI_API_KEY: ''
DASHSCOPE_API_KEY: ''
QWEN_API_KEY: ''
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,12 @@ jobs:
npm run typecheck

- name: 'Run Workspace Tests'
env:
# Match the tunable per-process bound used by the main CI gate.
VITEST_MAX_THREADS: "${{ startsWith(runner.name, 'ecs-qwen-') && (vars.QWEN_CI_VITEST_MAX_WORKERS || '4') || '' }}"
VITEST_MIN_THREADS: "${{ startsWith(runner.name, 'ecs-qwen-') && '1' || '' }}"
VITEST_MAX_FORKS: "${{ startsWith(runner.name, 'ecs-qwen-') && (vars.QWEN_CI_VITEST_MAX_WORKERS || '4') || '' }}"
VITEST_MIN_FORKS: "${{ startsWith(runner.name, 'ecs-qwen-') && '1' || '' }}"
run: |-
npm run test:release

Expand Down
22 changes: 22 additions & 0 deletions scripts/tests/no-ak-integration-ci.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,28 @@ describe('no-AK integration CI wiring', () => {
}
});

it('uses a tunable max for every Vitest pool on ECS', () => {
const workflow = readFileSync(
path.join(ROOT, '.github/workflows/ci.yml'),
'utf8',
);
const testStep = getWorkflowStep(
getWorkflowJob(workflow, 'test'),
'Run tests and generate reports',
);

for (const name of ['VITEST_MAX_THREADS', 'VITEST_MAX_FORKS']) {
expect(testStep).toContain(
`${name}: "\${{ startsWith(runner.name, 'ecs-qwen-') && (vars.QWEN_CI_VITEST_MAX_WORKERS || '4') || '' }}"`,
);
}
for (const name of ['VITEST_MIN_THREADS', 'VITEST_MIN_FORKS']) {
expect(testStep).toContain(
`${name}: "\${{ startsWith(runner.name, 'ecs-qwen-') && '1' || '' }}"`,
);
}
});

it('defines a focused no-AK integration script', () => {
const packageJson = JSON.parse(
readFileSync(path.join(ROOT, 'package.json'), 'utf8'),
Expand Down
10 changes: 10 additions & 0 deletions scripts/tests/package-scripts.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,16 @@ describe('package scripts', () => {
);
expect(workspaceTestStep).toContain('npm run test:release');
expect(workspaceTestStep).not.toContain('npm run test:ci');
for (const name of ['VITEST_MAX_THREADS', 'VITEST_MAX_FORKS']) {
expect(workspaceTestStep).toContain(
`${name}: "\${{ startsWith(runner.name, 'ecs-qwen-') && (vars.QWEN_CI_VITEST_MAX_WORKERS || '4') || '' }}"`,
);
}
for (const name of ['VITEST_MIN_THREADS', 'VITEST_MIN_FORKS']) {
expect(workspaceTestStep).toContain(
`${name}: "\${{ startsWith(runner.name, 'ecs-qwen-') && '1' || '' }}"`,
);
}
});

it('skips release install-time prepare and builds before publish bundling', () => {
Expand Down
Loading