mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-05-31 21:14:22 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user