From a065adcd828b4626c215f09e854d397ab8ca3534 Mon Sep 17 00:00:00 2001 From: Daniel Volz Date: Sun, 8 Feb 2026 15:05:33 +0100 Subject: [PATCH] ci: remove redundant test jobs from docker-build workflow (#132) Tests are already guaranteed by branch protection (test.yml must pass before PR can be merged to main). Running them again in docker-build.yml was redundant and slowed down image builds. This reduces test runs from 3x to 2x per code change: - test.yml on PR (required by branch protection) - update-test-badges.yml on main push (needed for badge counts) Docker image builds now start immediately after merge. --- .github/workflows/docker-build.yml | 46 +++--------------------------- 1 file changed, 4 insertions(+), 42 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index c82a621..c3b64f9 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -25,50 +25,12 @@ env: jobs: # ============================================================================= - # Run Tests First - # ============================================================================= - backend-test: - name: Backend Tests - runs-on: ubuntu-latest - permissions: - contents: read - defaults: - run: - working-directory: backend - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '22' - cache: 'npm' - cache-dependency-path: backend/package-lock.json - - run: npm ci - - run: npx tsc --noEmit - - run: npm run test:run - - frontend-build: - name: Frontend Build - runs-on: ubuntu-latest - permissions: - contents: read - defaults: - run: - working-directory: frontend - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: '22' - cache: 'npm' - cache-dependency-path: frontend/package-lock.json - - run: npm ci - - run: npm run build - - # ============================================================================= - # Build and Push Docker Images (only after tests pass) + # Build and Push Docker Images + # Tests are NOT run here — branch protection on main requires all PR checks + # (backend-test + frontend-build from test.yml) to pass before merge. + # Tags are created from main, so code is already tested. # ============================================================================= build-and-push: - needs: [backend-test, frontend-build] runs-on: ubuntu-latest permissions: contents: read