mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-08-31 10:16:57 +00:00
* ci: run Windows merge queue tests on ECS
* test(channels): skip POSIX mode assertion on Windows
* ci: expose Git Bash on Windows ECS runner
* ci: scope Windows ECS tuning to self-hosted and restore full test:ci
Review feedback on the Windows ECS routing: dropping test:scripts removed the only Windows execution of 9 Windows-only install-script tests, and the job-wide PowerShell default plus narrowed test command changed the kill-switch fallback away from the known-good hosted configuration.
Restore the full npm run test:ci on both paths (bash is available: pre-installed on hosted runners, exposed via the Git Bash PATH entry on ECS) and gate every ECS-specific adjustment on runner.environment: the PowerShell setup step (now also skip_ci-guarded), TEMP/TMP/LC_ALL env writes, and the Linux-style Node setup split that fails with an actionable error naming MAINTAINER_ECS_RUNNER_DISABLED. The windows-2022 fallback is byte-for-byte the pre-ECS job again.
* test: make Windows CI suites platform-aware
* ci: add stale-checkout guard to Windows ECS test job
* test(core): compare canonical directory identity
* ci: add fork guard and review follow-ups to Windows ECS job
* test(core): exercise real directory identity change
* test(core): wait for killed lease process exit
* test(scripts): avoid cmd echo trailing spaces
* test(scripts): use unambiguous cmd echo syntax
* test(cli): avoid sidecar I/O in truncation test
* test: fix Windows script-suite gaps and unify platform gating
- Fix missed trailing-space cmd stub in package-scripts.test.js so the
'runs prepare steps in order' assertion passes on Windows.
- Add qwen-pr-review-workflow.test.js and pr-self-report-label.test.js to
the win32 exclude list (both test Linux-only workflows and are not
portable to Windows).
- Replace local itPosix/describeOnNonWindows consts with vitest's built-in
it.skipIf/it.runIf/describe.skipIf, matching the codebase idiom.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* test(scripts): restore Windows workflow coverage
* test(scripts): re-exclude Windows-incompatible workflow tests on win32
Re-add pr-self-report-label.test.js and qwen-pr-review-workflow.test.js to
the win32 exclude list. Both fail on a Windows runner for reasons the code
still carries: qwen-pr-review-workflow.test.js calls execFileSync('mkdir'),
which has no executable to resolve there, and pr-self-report-label.test.js
joins PATH with ':', corrupting the ';'-separated Windows PATH so its gh
stub never resolves. Excluding them restores a green Windows gate; Linux CI
remains their authoritative coverage. Document the criterion inline.
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* ci: extract checkout-head guard into composite action, pin Windows gate (#8386)
Address review round 2: move the stale-checkout guard shared by the four CI gates into .github/actions/verify-checkout-head so the copies cannot drift, pin the Windows gate kill-switch routing and guard wiring in the script tests, re-enable lint.test.js on Windows via separator normalization and a lazy linter setup in scripts/lint.js, unify the platform skips on it.skipIf(process.platform === 'win32'), and document the queued-run behavior of the ECS kill switch.
* ci: fail fast in Windows gate environment setup (#8386)
* ci: dedupe self-hosted runner steps into actions, pin gate mutations (#8386)
* fix(ci): checkout before repository-local actions in Windows gates (#8386)
* fix(ci): configure Windows runner before bash guard
* test(ci): pin remaining shared-action wiring in script tests (#8386)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
* fix(ci): skip zip-dependent packaging tests when zip is missing (#8386)
* fix(ci): validate full Windows smoke path
* fix(ci): match Windows smoke shell to gate and drop dead runs-on guard (#8386)
* fix(ci): make SIGTERM escalation test Windows-aware and tighten pins (#8386)
The CDP acceptance test asserted a POSIX-only SIGKILL escalation, which
fails deterministically on Windows where kill('SIGTERM') terminates the
child directly — blocking the Windows merge-queue gate. Assert the
platform-appropriate signal instead.
Also address review suggestions: probe `unzip` alongside `zip`, pin the
integration_cli guard's missing step-level `if:`, stop getWorkflowStep
at unnamed steps, pin install-script.test.js out of the win32 excludes,
add the stale-checkout guard to windows-runner-smoke.yml, pin the
Node preflight warning branch and the guard reject path contiguously,
and extend the smoke shell-parity loop to the npm cache step.
* docs(ci): clarify Windows runner trust boundary
---------
Co-authored-by: qwen-code-dev-bot <qwen-code-dev@service.alibaba.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci-bot@users.noreply.github.com>
Co-authored-by: qwen-code-dev-bot <qwen-code-dev-bot@users.noreply.github.com>
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: qwen-code-ci-bot <qwen-code-ci@service.alibaba.com>
120 lines
4.6 KiB
YAML
120 lines
4.6 KiB
YAML
name: 'Windows Self-Hosted Runner Validation'
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: 'read'
|
|
|
|
jobs:
|
|
validate:
|
|
name: 'Validate runner'
|
|
runs-on: ['self-hosted', 'Windows', 'X64', 'ecs-win']
|
|
timeout-minutes: 60
|
|
steps:
|
|
# Mirrors the Windows merge-queue gate in ci.yml, so this smoke validates
|
|
# exactly the configuration that gate runs: autocrlf off before the
|
|
# checkout, then the shared configure action after it (repository-local
|
|
# `./` actions resolve from the job workspace, so the checkout must
|
|
# precede them).
|
|
- name: 'Disable Git CRLF conversion'
|
|
shell: 'powershell'
|
|
run: 'git config --global core.autocrlf false'
|
|
|
|
- name: 'Checkout'
|
|
uses: 'actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10' # v6.0.3
|
|
|
|
- name: 'Configure Windows test environment'
|
|
uses: './.github/actions/configure-windows-runner'
|
|
|
|
# Same stale-checkout guard as the gate: the smoke runs behind the same
|
|
# caching egress proxy, so fail loud if the checkout lacks the
|
|
# dispatched head instead of silently validating the wrong tree.
|
|
- name: 'Verify checkout includes expected head commit'
|
|
uses: './.github/actions/verify-checkout-head'
|
|
with:
|
|
expected_sha: '${{ github.sha }}'
|
|
|
|
- name: 'Verify tools'
|
|
shell: 'powershell'
|
|
run: |-
|
|
$ErrorActionPreference = 'Stop'
|
|
whoami
|
|
"TEMP=$env:TEMP"
|
|
if ($env:TEMP -ne $env:RUNNER_TEMP) {
|
|
throw "TEMP not redirected to RUNNER_TEMP: $env:TEMP"
|
|
}
|
|
git --version
|
|
$nodeVersion = node --version
|
|
$nodeVersion
|
|
if ([int]($nodeVersion -replace '^v(\d+)\..*$', '$1') -lt 22) {
|
|
throw "Node.js 22 or newer is required, found $nodeVersion."
|
|
}
|
|
npm --version
|
|
qwen --version
|
|
gh --version
|
|
|
|
- name: 'Verify symbolic links'
|
|
shell: 'powershell'
|
|
run: |-
|
|
$ErrorActionPreference = 'Stop'
|
|
$root = Join-Path $env:RUNNER_TEMP 'windows-runner-symlink-smoke'
|
|
$target = Join-Path $root 'target.txt'
|
|
$link = Join-Path $root 'link.txt'
|
|
New-Item -ItemType Directory -Force -Path $root | Out-Null
|
|
Set-Content -Path $target -Value 'ok'
|
|
try {
|
|
New-Item -ItemType SymbolicLink -Path $link -Target $target | Out-Null
|
|
if ((Get-Content $link) -ne 'ok') {
|
|
throw 'Symbolic link target is unreadable.'
|
|
}
|
|
} finally {
|
|
Remove-Item $root -Recurse -Force -ErrorAction SilentlyContinue
|
|
}
|
|
|
|
# Same Node path as the gate's self-hosted side: avoid setup-node
|
|
# downloads on ECS, where nodejs.org may be unreachable through the
|
|
# egress proxy.
|
|
- name: 'Use pre-installed Node.js'
|
|
uses: './.github/actions/self-hosted-node'
|
|
|
|
- name: 'Configure persistent npm cache (self-hosted)'
|
|
shell: 'bash'
|
|
run: |-
|
|
cache_dir="${HOME}/.cache/qwen-code/npm"
|
|
# Coreutils like mkdir are not guaranteed on a Git-Bash-only PATH,
|
|
# so create the directory through the Node the preflight verified.
|
|
node -e "require('node:fs').mkdirSync(process.argv[1], { recursive: true })" "${cache_dir}"
|
|
echo "NPM_CONFIG_CACHE=${cache_dir}" >> "${GITHUB_ENV}"
|
|
echo "Using persistent npm cache at ${cache_dir}"
|
|
du -sh "${cache_dir}" 2>/dev/null || true
|
|
|
|
# ci.yml's workflow-level defaults run the gate's steps under bash, so
|
|
# pin the same shell here: smoke evidence only transfers to the gate
|
|
# when both execute these commands the same way.
|
|
- name: 'Configure npm for rate limiting'
|
|
shell: 'bash'
|
|
run: |-
|
|
npm config set fetch-retry-mintimeout 20000
|
|
npm config set fetch-retry-maxtimeout 120000
|
|
npm config set fetch-retries 5
|
|
npm config set fetch-timeout 300000
|
|
|
|
- name: 'Install dependencies'
|
|
shell: 'bash'
|
|
run: 'npm ci --prefer-offline --no-audit --progress=false'
|
|
|
|
- name: 'Run tests and generate reports'
|
|
shell: 'bash'
|
|
env:
|
|
NO_COLOR: true
|
|
HOME: '${{ runner.temp }}/qwen-ci-home'
|
|
USERPROFILE: '${{ runner.temp }}/qwen-ci-home'
|
|
OPENAI_API_KEY: ''
|
|
DASHSCOPE_API_KEY: ''
|
|
QWEN_API_KEY: ''
|
|
GEMINI_API_KEY: ''
|
|
QWEN_DEFAULT_AUTH_TYPE: ''
|
|
run: |-
|
|
node -e "const fs = require('node:fs'); for (const key of ['HOME', 'USERPROFILE']) { const dir = process.env[key]; if (dir) fs.mkdirSync(dir, { recursive: true }); }"
|
|
npm run test:ci
|