Merge branch 'improveCi' into 'main'

Improve ci

See merge request v3/services/user!18
This commit is contained in:
Sylvain Briat 2023-02-09 12:00:10 +00:00
commit e060c9c548
4 changed files with 31 additions and 11 deletions

View File

@ -16,8 +16,9 @@ test:
services: services:
- docker:dind - docker:dind
script: script:
- docker-compose -f docker-compose.ci.yml --env-file ci/.env.ci up -d - docker-compose -f docker-compose.ci.tools.yml -p user-tools --env-file ci/.env.ci up -d
- sh ci/wait-up.sh - sh ci/wait-up.sh
- docker-compose -f docker-compose.ci.service.yml -p user-service --env-file ci/.env.ci up -d
- docker exec -t v3-user sh -c "npm run test:integration:ci" - docker exec -t v3-user sh -c "npm run test:integration:ci"
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/ coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
rules: rules:

View File

@ -13,3 +13,8 @@ BROKER_IMAGE=rabbitmq:3-alpine
# POSTGRES # POSTGRES
POSTGRES_IMAGE=postgres:15.0 POSTGRES_IMAGE=postgres:15.0
# REDIS
REDIS_IMAGE=redis:7.0-alpine
REDIS_HOST=v3-user-redis
REDIS_PORT=6379

View File

@ -0,0 +1,19 @@
version: '3.8'
services:
api:
container_name: v3-user
build:
dockerfile: ci/Dockerfile
context: .
env_file:
- ci/.env.ci
ports:
- 5001:5001
networks:
- v3-network
networks:
v3-network:
name: v3-network
external: true

View File

@ -1,18 +1,13 @@
version: '3.8' version: '3.8'
services: services:
api: redis:
container_name: v3-user container_name: v3-user-redis
build: image: ${REDIS_IMAGE}
dockerfile: ci/Dockerfile ports:
context: . - 6501:6379
env_file: env_file:
- ci/.env.ci - ci/.env.ci
ports:
- 5001:5001
depends_on:
- db
- broker
networks: networks:
- v3-network - v3-network