diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c41f013..5fb2303 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,6 +11,18 @@ jobs: - name: Checkout uses: actions/checkout@v4 + # The test image below swaps in Caddyfile.test, so the production + # Caddyfile is otherwise never exercised by CI — an invalid config then + # only surfaces when the deploy health-gate fails, after the broken + # container already replaced the healthy one (issue #20/#26). Validate + # both files up front so a parse error fails the PR check in seconds. + - name: Validate Caddyfiles + run: | + docker run --rm -v "$PWD":/workspace -w /workspace caddy:2-alpine \ + caddy validate --config Caddyfile --adapter caddyfile + docker run --rm -v "$PWD":/workspace -w /workspace caddy:2-alpine \ + caddy validate --config Caddyfile.test --adapter caddyfile + - name: Build Docker image run: docker build -t learning-platform .