Skip to content

Commit

Permalink
chore(backend): use local user id to run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledmashaly committed Jun 7, 2023
1 parent 680e5b5 commit b3de972
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ services:
extends:
file: docker-compose.dev.yml
service: app
user: "${UID}:${GID}"
command: /bin/sh -c "npm_config_cache=/usr/src/app/.npm-cache npx nx run-tests backend"

postgres:
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": "docker compose -f docker-compose.test.yml up --exit-code-from app --attach app"
"command": "UID=\"$(id -u)\" GID=\"$(id -g)\" 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 b3de972

Please sign in to comment.