From 70283a8fa7da0aad74e1f2b0848560f9968e94b3 Mon Sep 17 00:00:00 2001 From: Artyom Kazak Date: Thu, 3 Jan 2019 00:07:52 +1100 Subject: [PATCH] Travis improvements (#253) * Fix xvfb * Install Stack differently * Revert to Ubuntu Trusty * Fix test path --- .travis.yml | 20 ++++++-------------- Makefile | 2 +- docker/back/Dockerfile | 2 +- front/package.json | 2 +- 4 files changed, 9 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a4e2fe..612c241 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ sudo: true -dist: xenial +dist: trusty language: generic @@ -31,22 +31,13 @@ jobs: include: - stage: "Build backend dependencies" before_script: - - mkdir -p ~/.local/bin - - export PATH=$HOME/.local/bin:$PATH - - >- - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | - tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' + - curl -sSL https://get.haskellstack.org/ | sh script: - stack --no-terminal --install-ghc test --no-run-tests --dependencies-only - stage: "Build the backend" before_script: - # Install Stack - - mkdir -p ~/.local/bin - - export PATH=$HOME/.local/bin:$PATH - - >- - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | - tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack' + - curl -sSL https://get.haskellstack.org/ | sh script: - stack --no-terminal build @@ -60,6 +51,7 @@ jobs: - stage: "Test the backend" before_script: + - curl -sSL https://get.haskellstack.org/ | sh # Install chromedriver - wget http://chromedriver.storage.googleapis.com/2.45/chromedriver_linux64.zip - unzip chromedriver_linux64.zip @@ -68,8 +60,8 @@ jobs: - sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver - sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver # Run selenium-server - - export DISPLAY=:99.0 - - sh -e /etc/init.d/xvfb start + - "export DISPLAY=:99.0" + - "sh -e /etc/init.d/xvfb start" - travis_retry wget https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar -O selenium.jar - java -jar selenium.jar 2> /dev/null & - sleep 15 diff --git a/Makefile b/Makefile index b5b2b74..bb87ef6 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ back/run: stack exec --cwd back -- guide # Create a Docker image for the backend; will only work on Travis because -# the binary has to have been compiled on Ubuntu Xenial (the OS used in the +# the binary has to have been compiled on Ubuntu Trusty (the OS used in the # Docker file) .PHONY: back/travis-docker back/travis-docker: diff --git a/docker/back/Dockerfile b/docker/back/Dockerfile index 8a4c834..a08264c 100644 --- a/docker/back/Dockerfile +++ b/docker/back/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:xenial +FROM ubuntu:trusty ENV LANG=C.UTF-8 ENV LC_ALL=C.UTF-8 diff --git a/front/package.json b/front/package.json index 89c3f37..e859017 100644 --- a/front/package.json +++ b/front/package.json @@ -11,7 +11,7 @@ "build-all": "npm run client:build && npm run server:build", "start:dev": "concurrently \"npm run client:dev\" \"npm run server:dev\"", "start:prod": "cross-env NODE_ENV=production node server/bin.js", - "test": "testcafe chrome client/page/*.test.js --app \"npm run start:dev\" --app-init-delay 10000" + "test": "testcafe chrome client/tests/*.test.js --app \"npm run start:dev\" --app-init-delay 10000" }, "dependencies": { "@junyiz/koa-proxy-pass": "^1.2.1",