GH Actions: Add .env when Starting Backend

This commit is contained in:
ADAMJR 2021-11-05 15:19:51 +00:00
parent 3b8ba9bb6d
commit 80a1c59748
2 changed files with 6 additions and 6 deletions

View File

@ -32,12 +32,9 @@ jobs:
run: npm test
working-directory: ./backend
env:
API_URL: http://localhost:3001/api
EMAIL_ADDRESS: example@gmail.com
EMAIL_PASSWORD: google_account_password
MONGO_URI: mongodb://localhost/accord-test
NODE_ENV: dev
PORT: 3001
ROOT_ENDPOINT: http://localhost:3001
WEBSITE_URL: http://localhost:4200
- name: Install Frontend Packages
@ -47,6 +44,11 @@ jobs:
- name: Start Backend for Frontend e2e
run: npm start
working-directory: ./backend
env:
MONGO_URI: mongodb://localhost/accord
NODE_ENV: dev
PORT: 3000
WEBSITE_URL: http://localhost:4200
- name: Test Frontend
uses: cypress-io/github-action@v2

2
types/dotenv.d.ts vendored
View File

@ -1,13 +1,11 @@
declare global {
namespace NodeJS {
export interface ProcessEnv {
API_URL: string;
EMAIL_ADDRESS: string;
EMAIL_PASSWORD: string;
MONGO_URI: string;
NODE_ENV: 'dev' | 'prod';
PORT: string;
ROOT_ENDPOINT: string;
WEBSITE_URL: string;
}
}