From d74aa6dd027be73d8782d08d4adfb781f20a0d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 23 Nov 2018 20:45:17 +0100 Subject: [PATCH] Build and run docker container on Travis The docker container environment should be the single source of truth --- .travis.yml | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index f663eba38..05142b9ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,18 +11,10 @@ services: # install: # nothing! -jobs: - include: - - stage: Prepare Cache - script: true - - stage: Build and Test - script: - - docker build -t humanconnection/backend . - - script: - - yarn install --frozen-lockfile --non-interactive --ignore-engines - - yarn global add codacy-coverage - - yarn run ci - - cat ./coverage/lcov.info | codacy-coverage +before_script: + - docker build -t humanconnection/backend . +script: + - docker run humanconnection/backend yarn run db:seed after_success: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh @@ -33,11 +25,6 @@ after_success: docker tag humanconnection/backend humanconnection/backend:latest; docker push humanconnection/backend:latest; fi -# - if [ $TRAVIS_BRANCH == "develop" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then -# docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; -# docker tag humanconnection/backend humanconnection/backend:latest; -# docker push humanconnection/backend:latest; -# fi after_failure: - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh