image: node:latest variables: NODE_ENV: "ci" POSTGRES_DB: "postgres" POSTGRES_USER: "postgres" POSTGRES_PASSWORD: "postgres" stages: - test - deploy cache: paths: - node_modules/ testing: stage: test services: - postgres:latest script: - yarn install - ./node_modules/.bin/sequelize db:migrate - yarn test --ci --collectCoverage=true coverage: /All files\s*\|\s*([\d\.]+)/ artifacts: paths: - junit.xml - coverage/ - reports/ reports: junit: junit.xml pages: stage: deploy dependencies: - testing script: - mv coverage/ public/ artifacts: paths: - public expire_in: 30 days only: - develop