From 33280a2059ca75b1d54f0579e56db3d0002432fe Mon Sep 17 00:00:00 2001 From: Thomas Camlong Date: Mon, 18 May 2026 21:46:21 +0200 Subject: [PATCH] fix(turbo): remove runtime env vars from build cache key These env vars (DB_*, AUTH_*, DOCKER_*, etc.) are all runtime configuration provided by users when running the Docker container. They don't influence the build output since Next.js standalone mode reads process.env at runtime and SKIP_ENV_VALIDATION=true skips validation during build. Listing them in build.env caused unnecessary cache busting in local dev. Also restores coverage report comments per review feedback. --- .github/workflows/code-quality.yml | 2 ++ turbo.json | 41 ------------------------------ 2 files changed, 2 insertions(+), 41 deletions(-) diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index 4aa3a4eaa..e972a1b0c 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -83,6 +83,8 @@ jobs: run: pnpm test - name: "Report Coverage" + # Set if: always() to also generate the report if tests are failing + # Only works if you set `reportOnFailure: true` in your vite config as specified above if: always() uses: davelosert/vitest-coverage-report-action@v2 diff --git a/turbo.json b/turbo.json index acf0c3c83..a2a52c350 100644 --- a/turbo.json +++ b/turbo.json @@ -13,47 +13,6 @@ }, "build": { "dependsOn": ["^build"], - "env": [ - "AUTH_LDAP_BASE", - "AUTH_LDAP_BIND_DN", - "AUTH_LDAP_BIND_PASSWORD", - "AUTH_LDAP_GROUP_CLASS", - "AUTH_LDAP_GROUP_FILTER_EXTRA_ARG", - "AUTH_LDAP_GROUP_MEMBER_ATTRIBUTE", - "AUTH_LDAP_GROUP_MEMBER_USER_ATTRIBUTE", - "AUTH_LDAP_SEARCH_SCOPE", - "AUTH_LDAP_URI", - "AUTH_LDAP_USERNAME_ATTRIBUTE", - "AUTH_LDAP_USER_MAIL_ATTRIBUTE", - "AUTH_LDAP_USERNAME_FILTER_EXTRA_ARG", - "AUTH_OIDC_AUTO_LOGIN", - "AUTH_OIDC_CLIENT_ID", - "AUTH_OIDC_CLIENT_NAME", - "AUTH_OIDC_CLIENT_SECRET", - "AUTH_OIDC_FORCE_USERINFO", - "AUTH_OIDC_GROUPS_ATTRIBUTE", - "AUTH_OIDC_ISSUER", - "AUTH_OIDC_NAME_ATTRIBUTE_OVERWRITE", - "AUTH_OIDC_SCOPE_OVERWRITE", - "AUTH_LOGOUT_REDIRECT_URL", - "AUTH_PROVIDERS", - "AUTH_SESSION_EXPIRY_TIME", - "DB_DRIVER", - "DB_HOST", - "DB_NAME", - "DB_PASSWORD", - "DB_PORT", - "DB_URL", - "DB_USER", - "DISABLE_REDIS_LOGS", - "DOCKER_HOSTNAMES", - "DOCKER_PORTS", - "DOCKER_SOCKET_PATHS", - "LOCAL_CERTIFICATE_PATH", - "LOG_LEVEL", - "PORT", - "SECRET_ENCRYPTION_KEY" - ], "inputs": ["$TURBO_DEFAULT$", "!**/*.test.ts", "!**/*.test.tsx", "!**/*.spec.ts", "!**/__tests__/**"], "outputs": [".next/**", "!.next/cache/**", "next-env.d.ts", ".output/**", ".vercel/output/**"] },