stages: - prebuild_and_test - deploy cache: paths: - _build - deps variables: POSTGRES_PASSWORD: "postgres" POSTGRES_USER: "postgres" DATABASE_URL: "postgres" MIX_ENV: "test" services: - name: postgres:12 prebuild: stage: prebuild_and_test image: "docker" services: - docker:19.03.12-dind script: - docker build --pull -t $CI_REGISTRY_IMAGE . test: stage: prebuild_and_test image: "elixir:1.10" script: script/cibuild deploy: stage: deploy image: "circleci/node:14.5" script: - echo $CI_REGISTRY - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - npm install - npx semantic-release