user/.gitlab-ci.yml

28 lines
659 B
YAML
Raw Normal View History

2023-01-09 14:08:45 +00:00
image: docker:20.10.22
stages:
- build
- test
- production
##############
# TEST STAGE #
##############
# Dev test
test-api-dev:
stage: test
image: docker/compose:latest
variables:
DOCKER_TLS_CERTDIR: ""
services:
- docker:dind
script:
2023-01-09 14:15:21 +00:00
- docker-compose -f docker-compose.ci.yml --env-file .env.test up -d
2023-01-09 14:08:45 +00:00
- sh ci/wait-up.sh
2023-01-09 14:15:21 +00:00
- docker-compose -f docker-compose.ci.yml --env-file .env.test logs
2023-01-09 14:08:45 +00:00
- 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