Skip to content

Commit

Permalink
chore(backend): fix tests npm cache issue
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledmashaly committed Jun 7, 2023
1 parent 4306a90 commit 680e5b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ packages/backend/.env

# produced by unsandboxed engine execution
.pnpm-store

# produced by backend tests
.npm-cache
3 changes: 1 addition & 2 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ services:
extends:
file: docker-compose.dev.yml
service: app
user: ${UID}:${GID}
command: npx nx run-tests backend
command: /bin/sh -c "npm_config_cache=/usr/src/app/.npm-cache npx nx run-tests backend"

postgres:
extends:
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
}
},
"test": {
"command": "UID=\"$(id -u)\" GID=\"$(id -g)\" docker compose -f docker-compose.test.yml up --exit-code-from app --attach app"
"command": "docker compose -f docker-compose.test.yml up --exit-code-from app --attach app"
},
"db": {
"executor": "nx:run-commands",
Expand Down

0 comments on commit 680e5b5

Please sign in to comment.