Skip to content

Commit

Permalink
debug github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
haianhng31 committed Jul 2, 2024
1 parent ec9d654 commit ca3c601
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 20.x]
node-version: [14.x, 16.x]

steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 5 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
const dotenv = require("dotenv");
const env = dotenv.config();
if (env.error) {
throw new Error("Failed to load the .env file!");

if (process.env.NODE_ENV !== 'test') {
if (env.error) {
throw new Error("Failed to load the .env file!");
}
}

const mongoose = require("mongoose");
Expand Down

0 comments on commit ca3c601

Please sign in to comment.