fix(tests): update contract tests voor Docker-based CI workflow
CI / check (push) Failing after 3m4s
CI / deploy (push) Skipped

This commit is contained in:
openhands committed 2026-09-04 11:16:07 +02:00
1 parent e97a9f3119
commit c949319332
2 files changed
+33 -181

No files matched your search

+5 -18
View File
@@ -13,34 +13,21 @@ describe("CI workflow", () => {
expect(workflow).toContain("pnpm typecheck");
expect(workflow).toContain("pnpm test");
expect(workflow).toContain("needs: check");
expect(workflow).toContain(
"gitea.event_name == 'push' && gitea.ref_name == 'main'",
);
expect(workflow).toContain("worktree add --detach");
expect(workflow).toContain("gitea.event_name == 'push'");
expect(workflow).toContain("gitea.ref_name == 'main'");
expect(workflow).toContain("/api/health");
expect(workflow).not.toContain("github.ref");
});
it("uses Gitea SHA for check checkout", () => {
expect(workflow).toContain("gitea.sha");
expect(workflow).toContain("SKIP_ENV_VALIDATION=1");
});
it("keeps tag release in the same workflow", () => {
it("includes tag triggers", () => {
expect(workflow).toContain('tags:\n - "v*"');
expect(workflow).toContain("Creating release for");
expect(workflow).toContain("startsWith(gitea.ref_name, 'v')");
});
it("applies CMS migrations on tag release before build", () => {
const release = workflow.slice(workflow.indexOf("\n release:"));
expect(release).toContain("pnpm db:migrate");
expect(release).not.toContain("pnpm prisma:generate");
expect(release).toContain("pnpm db:migrate");
expect(release).toContain("src/db/schema.ts");
const migrateAt = release.indexOf("pnpm db:migrate");
const buildAt = release.indexOf("pnpm build");
expect(migrateAt).toBeGreaterThan(-1);
expect(buildAt).toBeGreaterThan(migrateAt);
it("runs knip for unused code detection", () => {
expect(workflow).toContain("pnpm knip");
});
});