From 5b6a010da63f373c6e5b2658ecd28c79dc06759d Mon Sep 17 00:00:00 2001 From: you Date: Tue, 24 Mar 2026 00:52:35 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20tests=20must=20pass=20before=20deploy=20?= =?UTF-8?q?=E2=80=94=20no=20untested=20code=20in=20prod?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .github/workflows/deploy.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da812073..ce1815a8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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