From f63395bc951340a00429f17ac455e8a1fb29bd01 Mon Sep 17 00:00:00 2001 From: dancodingbr Date: Sat, 2 May 2026 11:35:57 -0300 Subject: [PATCH] fix(ci): expose API_URL env var to frontend unit tests @ngx-env/builder reads API_URL from process.env at build time. In CI the root .env is not present (gitignored), so API_URL was never set, leaving import.meta.env.API_URL undefined at runtime and causing Angular DI assertion failures across all component tests. Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5a1048..a700b61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,8 @@ jobs: - name: Run unit tests run: cd frontend && npm test -- --watch=false --browsers=ChromeHeadless + env: + API_URL: http://localhost:8080 - name: Upload coverage report if: always()