diff --git a/.dockerignore b/.dockerignore index f363d4044..fa06a985d 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,5 +6,6 @@ npm-debug.log Dockerfile docker-compose*.yml +scripts/ .env diff --git a/.travis.yml b/.travis.yml index bbd211c18..333fae013 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,34 @@ language: node_js node_js: - "10" -services: - - docker cache: yarn: true directories: - node_modules +services: + - docker + +env: + - DOCKER_COMPOSE_VERSION=1.23.2 + +before_install: + - scripts/run_fullstack_tests.sh # trigger full stack testing in a different repository + - sudo rm /usr/local/bin/docker-compose + - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose + - chmod +x docker-compose + - sudo mv docker-compose /usr/local/bin install: - docker build --build-arg BUILD_COMMIT=$TRAVIS_COMMIT -t humanconnection/nitro-web . + - docker-compose up -d script: - - docker run humanconnection/nitro-web yarn run lint + - docker-compose exec webapp yarn run lint after_success: - # - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh - # - chmod +x send.sh - # - ./send.sh success $WEBHOOK_URL + - wget https://raw.githubusercontent.com/DiscordHooks/travis-ci-discord-webhook/master/send.sh + - chmod +x send.sh + - ./send.sh success $WEBHOOK_URL - if [ $TRAVIS_BRANCH == "master" ] && [ $TRAVIS_EVENT_TYPE == "push" ]; then docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"; docker tag humanconnection/nitro-web humanconnection/nitro-web:latest; diff --git a/package.json b/package.json index c9d51e7a3..681d760e0 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "eslint-plugin-prettier": "3.0.0", "eslint-plugin-vue": "^5.0.0", "jest": "^23.6.0", - "node-sass": "^4.9.3", + "node-sass": "^4.11.0", "nodemon": "^1.11.0", "nuxt-sass-resources-loader": "^2.0.5", "prettier": "1.14.3", diff --git a/scripts/run_fullstack_tests.sh b/scripts/run_fullstack_tests.sh new file mode 100755 index 000000000..5176c493c --- /dev/null +++ b/scripts/run_fullstack_tests.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if [[ -v TRAVIS_TOKEN ]]; then + # You need a Travis token to trigger the build on our meta repository. + # This token will not be available on forks of this repo. + curl -L https://raw.githubusercontent.com/Human-Connection/Human-Connection/master/scripts/trigger_build.sh > scripts/trigger_build.sh + chmod +x scripts/trigger_build.sh + ./scripts/trigger_build.sh +fi diff --git a/yarn.lock b/yarn.lock index d7ecfc8a6..f2c66a979 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7287,10 +7287,10 @@ node-releases@^1.0.1: dependencies: semver "^5.3.0" -node-sass@^4.9.3: - version "4.10.0" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.10.0.tgz#dcc2b364c0913630945ccbf7a2bbf1f926effca4" - integrity sha512-fDQJfXszw6vek63Fe/ldkYXmRYK/QS6NbvM3i5oEo9ntPDy4XX7BcKZyTKv+/kSSxRtXXc7l+MSwEmYc0CSy6Q== +node-sass@^4.11.0: + version "4.11.0" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.11.0.tgz#183faec398e9cbe93ba43362e2768ca988a6369a" + integrity sha512-bHUdHTphgQJZaF1LASx0kAviPH7sGlcyNhWade4eVIpFp6tsn7SV8xNMTbsQFpEV9VXpnwTTnNYlfsZXgGgmkA== dependencies: async-foreach "^0.1.3" chalk "^1.1.1"