Run lint from the docker container

We want to run everything, including eslint, from the docker container.
As a next step we would run software tests from the docker container.
Installing the correct version of docker-compose is required, the
default version docker-compose on Travis is older than 3.7.
This commit is contained in:
Robert Schäfer 2018-12-10 17:33:00 +01:00
parent 22354ce865
commit ee80f56c79

View File

@ -1,18 +1,28 @@
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:
- 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