test ci --check
This commit is contained in:
parent
2db903cd1c
commit
fe24afb712
|
@ -19,9 +19,6 @@ test-api-dev:
|
||||||
- docker:dind
|
- docker:dind
|
||||||
script:
|
script:
|
||||||
- docker-compose -f docker-compose.ci.yml --env-file .env.test up -d
|
- 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:
|
rules:
|
||||||
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
- if: '$CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH || $CI_COMMIT_MESSAGE =~ /--check/ || $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||||
when: always
|
when: always
|
||||||
|
|
|
@ -19,5 +19,5 @@ COPY . .
|
||||||
# Creates a "dist" folder
|
# Creates a "dist" folder
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# Start the server
|
# Execute test suite
|
||||||
CMD [ "node", "dist/main.js" ]
|
RUN npm run test
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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
|
do
|
||||||
sleep 5
|
sleep 5
|
||||||
echo "Waiting for Test DB to be up..."
|
echo "Waiting for Test DB to be up..."
|
||||||
|
|
|
@ -8,6 +8,7 @@ services:
|
||||||
context: .
|
context: .
|
||||||
env_file:
|
env_file:
|
||||||
- .env.test
|
- .env.test
|
||||||
|
command: npm run test
|
||||||
ports:
|
ports:
|
||||||
- 5001:5001
|
- 5001:5001
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|
Loading…
Reference in New Issue