修复 CI 契约检查与原生依赖锁
Project CI / Repository checks (push) Successful in 1m30s
Project CI / Frontend tests (push) Successful in 2m55s
Project CI / Backend tests (push) Successful in 4m1s
Project CI / Native shell tests (push) Successful in 12m55s

改用量词表达工作流缩进正则以通过 ESLint。

补齐 AGC shared-contracts 的 sha2 锁依赖。
This commit is contained in:
2026-08-07 19:26:44 +08:00
parent 9c2f02db25
commit f113326973
2 changed files with 4 additions and 3 deletions
+1
View File
@@ -4570,6 +4570,7 @@ version = "0.1.0"
dependencies = [
"serde",
"serde_json",
"sha2",
]
[[package]]
+3 -3
View File
@@ -44,7 +44,7 @@ function jobSection(jobName: (typeof jobNames)[number]) {
const nextJobOffset = workflow
.slice(jobStart + 1)
.search(/^ [a-z][a-z0-9-]+:$/m);
.search(/^ {2}[a-z][a-z0-9-]+:$/m);
return workflow.slice(
jobStart,
nextJobOffset < 0 ? undefined : jobStart + 1 + nextJobOffset,
@@ -56,7 +56,7 @@ function stepSection(jobName: (typeof jobNames)[number], stepName: string) {
const stepStart = job.indexOf(` - name: ${stepName}`);
expect(stepStart).toBeGreaterThanOrEqual(0);
const nextStepOffset = job.slice(stepStart + 1).search(/^ - name: /m);
const nextStepOffset = job.slice(stepStart + 1).search(/^ {6}- name: /m);
return job.slice(
stepStart,
nextStepOffset < 0 ? undefined : stepStart + 1 + nextStepOffset,
@@ -76,7 +76,7 @@ function backendStepIndex(stepName: string) {
describe('project CI workflow', () => {
it('keeps every job on the isolated preinstalled CI image boundary', () => {
expect(workflow.match(/^ runs-on: genarrative-ci$/gm)).toHaveLength(4);
expect(workflow.match(/^ {4}runs-on: genarrative-ci$/gm)).toHaveLength(4);
expect(workflow).not.toContain('actions/checkout');
expect(workflow).not.toContain('actions/setup-node');
expect(workflow).not.toMatch(/^\s+run: .*\b(?:apt|rustup)\b/m);