chore: upgrade Node.js runtime to v24 across codebase #419
@@ -5,9 +5,11 @@ import * as fs from "fs";
|
|||||||
|
|
||||||
// Load environment variables from .env.test if it exists
|
// Load environment variables from .env.test if it exists
|
||||||
// This allows local integration tests to run with a local database
|
// This allows local integration tests to run with a local database
|
||||||
// CI environments explicitly provide DATABASE_URL in the test step
|
// CI environments explicitly provide DATABASE_URL in the test step, so skip loading .env.test there
|
||||||
const envTestPath = path.resolve(__dirname, ".env.test");
|
const envTestPath = path.resolve(__dirname, ".env.test");
|
||||||
if (fs.existsSync(envTestPath)) {
|
const isCI = process.env.CI === "true" || process.env.WOODPECKER === "true";
|
||||||
|
|
||||||
|
if (!isCI && fs.existsSync(envTestPath)) {
|
||||||
const result = dotenv.config({ path: envTestPath });
|
const result = dotenv.config({ path: envTestPath });
|
||||||
if (result.error) {
|
if (result.error) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
Reference in New Issue
Block a user