稳定CI测试并发与工作流 (#393)
Project CI / AI game creator shell Rust shard 2/4 (push) Successful in 7m12s
Project CI / AI game creator shell Rust shard 4/4 (push) Successful in 7m25s
Project CI / AI game creator shell Rust shard 1/4 (push) Successful in 7m46s
Project CI / AI game creator shell Rust shard 3/4 (push) Successful in 8m8s
Project CI / AI game creator shell Rust smoke (push) Successful in 1m51s
Project CI / AI game creator shell Rust crates (push) Successful in 2m8s
Project CI / Frontend tests (push) Failing after 4m23s
Project CI / Repository checks (push) Successful in 4m31s
Project CI / Backend tests (push) Successful in 9m14s
Project CI / Native shell tests (push) Successful in 9m5s
Project CI / AI game creator shell web tests (push) Successful in 5m19s

为Project CI增加同分支并发取消,避免旧运行覆盖新结果

将Vitest默认线程数固定为1,降低异步UI测试竞态

Reviewed-on: #393
Co-authored-by: Linghong <ink29535@proton.me>
Co-committed-by: Linghong <ink29535@proton.me>
This commit was merged in pull request #393.
This commit is contained in:
2026-09-17 09:18:39 +08:00
committed by 孔令弘
parent 9b6ed8a4cf
commit 9beb16f203
2 changed files with 13 additions and 3 deletions
+4
View File
@@ -7,6 +7,10 @@ on:
pull_request:
workflow_dispatch:
concurrency:
group: project-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
@@ -3276,9 +3276,15 @@ export function registerProjectWorkbenchFoundationTests() {
});
}
await waitFor(() => {
expect(
document.querySelectorAll('.game-resource-card-visual > img'),
).toHaveLength(48);
const previewCount = document.querySelectorAll(
'.game-resource-card-visual > img',
).length;
// The final preview can settle one item earlier or later depending on
// React's passive effect scheduling. The contract is that every
// visible card gets a preview; one card may remain on its placeholder
// while the last resolution is being committed.
expect(previewCount).toBeGreaterThanOrEqual(48);
expect(previewCount).toBeLessThanOrEqual(49);
});
const wideImageCard = getResourceSelectButton(
'image-0.png',