mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Merge pull request #4337 from Ocelot-Social-Community/clear_env_docker_workflows
Clean env, docker & workflow
This commit is contained in:
commit
282e65aa0d
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@ -194,7 +194,6 @@ jobs:
|
||||
##########################################################################
|
||||
# UNIT TESTS BACKEND #####################################################
|
||||
##########################################################################
|
||||
# TODO: Why do we need those .envs?
|
||||
- name: backend | copy env files webapp
|
||||
run: cp webapp/.env.template webapp/.env
|
||||
- name: backend | copy env files backend
|
||||
@ -230,9 +229,8 @@ jobs:
|
||||
- name: Load Docker Image
|
||||
run: docker load < /tmp/webapp.tar
|
||||
##########################################################################
|
||||
# UNIT TESTS WEBAPP #####################################################
|
||||
# UNIT TESTS WEBAPP ######################################################
|
||||
##########################################################################
|
||||
# TODO: Why do we need those .envs?
|
||||
- name: backend | copy env files webapp
|
||||
run: cp webapp/.env.template webapp/.env
|
||||
- name: backend | copy env files backend
|
||||
@ -240,5 +238,4 @@ jobs:
|
||||
- name: backend | docker-compose
|
||||
run: docker-compose -f docker-compose.yml -f docker-compose.test.yml up --detach --no-deps webapp
|
||||
- name: webapp | Unit tests
|
||||
#run: docker run --rm ocelotsocialnetwork/webapp:build yarn run test
|
||||
run: docker-compose exec -T webapp yarn test
|
||||
@ -7,9 +7,8 @@ if (require.resolve) {
|
||||
try {
|
||||
dotenv.config({ path: require.resolve('../../.env') })
|
||||
} catch (error) {
|
||||
if (error.code === 'MODULE_NOT_FOUND') {
|
||||
console.log('WARN: No `.env` file found in `/app` (docker) or `/backend` (no docker)') // eslint-disable-line no-console
|
||||
} else {
|
||||
// This error is thrown when the .env is not found
|
||||
if (error.code !== 'MODULE_NOT_FOUND') {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user