mirror of
https://github.com/aelve/guide.git
synced 2024-12-23 04:42:24 +03:00
Travis improvements (#253)
* Fix xvfb * Install Stack differently * Revert to Ubuntu Trusty * Fix test path
This commit is contained in:
parent
1758dab793
commit
70283a8fa7
20
.travis.yml
20
.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
|
||||
|
2
Makefile
2
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:
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM ubuntu:xenial
|
||||
FROM ubuntu:trusty
|
||||
|
||||
ENV LANG=C.UTF-8
|
||||
ENV LC_ALL=C.UTF-8
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user