ci: report API type errors as an advisory warning
Type errors in the API should be visible without blocking merges, so the existing api test job now runs the typecheck as an extra step. A non-zero exit becomes a workflow warning, leaving the run green with the errors in the log
Pedro Lucas Porcellis porcellis@eletrotupi.com · 12 days ago
8173e20305ef3ad96d0acd20e59c226269acf500 Browse filesParents
d597464Changed files
1
Additions
+4
Deletions
0
.github/workflows/deploy.yml
1 1
name: Test & Deploy
2 2
3 3
on:
4 4
push:
5 5
branches:
63 63
run: |
64 64
node scripts/create-test-db.mjs
65 65
npx prisma generate
66 66
npx prisma db push
67 67
68 +
- name: Typecheck (advisory)
69 +
run: |
70 +
npm run typecheck || echo "::warning title=API typecheck::tsc reported errors (advisory, see log above)"
71 +
68 72
- name: Run tests
69 73
run: npx vitest run
70 74
71 75
build-and-push:
72 76
name: Build & push image
140 144
# old image layers pile up across deploys; keep roughly the last week
141 145
docker image prune -af --filter "until=168h" >/dev/null 2>&1 || true
142 146
143 147
sleep 5
144 148
docker compose logs --tail=50 api