stages: - check - test - lint - documentation variables: ENV: DEV SECRET_KEY: stupid_key_for_CI POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres DB_HOST: postgres DB_PORT: 5432 check_back: stage: check image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend services: - postgres:10.5 script: - cd backend - ./manage.py check tags: - docker check_front: stage: check image: node:10.15.1-alpine cache: paths: - frontend/node_modules/ before_script: - cd frontend && npm i script: - npm run build tags: - docker test_back: stage: test image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend services: - postgres:10.5 script: - cd backend - pytest base_app/ frontend_app/ backend_app/ --cov-report html artifacts: paths: - backend/htmlcov/ expire_in: 1 month tags: - docker flake8: stage: lint image: registry.gitlab.utc.fr/rex-dri/rex-dri/backend script: - cd backend && flake8 tags: - docker eslint: stage: lint image: node:10.15.1-alpine cache: paths: - frontend/node_modules/ before_script: - cd frontend && npm i script: - npm run lint tags: - docker pages: stage: documentation image: floawfloaw/plantuml dependencies: - test_back script: - mkdir .public - mv backend/htmlcov/ .public/coverage - make documentation - mv documentation/ .public/documentation - mv .public public artifacts: paths: - public expire_in: 1 month only: - master tags: - docker