test ci --check
This commit is contained in:
parent
2db903cd1c
commit
fe24afb712
|
@ -19,9 +19,6 @@ test-api-dev:
|
|||
- docker:dind
|
||||
script:
|
||||
- docker-compose -f docker-compose.ci.yml --env-file .env.test up -d
|
||||
- sh ci/wait-up.sh
|
||||
- docker-compose -f docker-compose.ci.yml --env-file .env.test logs
|
||||
- docker exec -t v3-user sh -c "npm run test"
|
||||
rules:
|
||||
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||
when: always
|
||||
|
|
|
@ -19,5 +19,5 @@ COPY . .
|
|||
# Creates a "dist" folder
|
||||
RUN npm run build
|
||||
|
||||
# Start the server
|
||||
CMD [ "node", "dist/main.js" ]
|
||||
# Execute test suite
|
||||
RUN npm run test
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
while ! docker logs v3-user-db-test --tail=1 | grep -q "database system is ready to accept connections";
|
||||
while ! docker logs v3-user-db-test --tail=1 | grep -q -i "database system is ready to accept connections";
|
||||
do
|
||||
sleep 5
|
||||
echo "Waiting for Test DB to be up..."
|
||||
|
|
|
@ -8,6 +8,7 @@ services:
|
|||
context: .
|
||||
env_file:
|
||||
- .env.test
|
||||
command: npm run test
|
||||
ports:
|
||||
- 5001:5001
|
||||
depends_on:
|
||||
|
|
Loading…
Reference in New Issue