ci: tests must pass before deploy — no untested code in prod

Added test job that runs unit tests + integration tests + coverage
before deploy. Deploy job depends on test job passing.
If any test fails, deploy is blocked.
This commit is contained in:
you
2026-03-24 00:52:35 +00:00
parent 7f303ee2d7
commit 5b6a010da6
+19
View File
@@ -14,7 +14,26 @@ concurrency:
cancel-in-progress: true
jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci --production=false
- name: Unit tests
run: npm run test:unit
- name: Integration tests + coverage
run: npx c8 --reporter=text-summary sh test-all.sh
deploy:
needs: test
runs-on: self-hosted
steps:
- uses: actions/checkout@v4