From 76051e52dd48ffe3e9b6540d89562dcffc67a7ca Mon Sep 17 00:00:00 2001 From: Giancarmine Salucci Date: Sat, 9 May 2026 15:51:24 +0200 Subject: [PATCH] ci: add test job before Docker build Run vitest before building the image so a failing test blocks the push. build-and-push now depends on the test job passing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitea/workflows/docker-build.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index a6d50ee..951113c 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -15,8 +15,28 @@ env: IMAGE_NAME: mozempk/tonemark jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm test + build-and-push: runs-on: ubuntu-latest + needs: test steps: - name: Checkout repository