1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-25 13:51:45 +03:00
guide/.travis.yml
Vladislav Sabanov 65800eda6a
[WIP] Remove kinds and add hackage as option (#249)
* Split hackage

* WIP

* Migrate to newer safecopy-migrate

* Fix migrate

* Rename description to summary for item

* Fix link to templates

* Frontend tests fix for pr #249

* Change the path back

* WIP. Fix templates

* Update back/src/Guide/Api/Types.hs

* Remove unnecessary stuff from .gitignore

* Revert style changes

* Two spaces

* _itemDescription has been renamed

* Remove the Hackage test

* name_on_hackage -> hackage

* Fix Hackage param' type

* front changes from kind to hackage

* Fix tests

* Try fix templete

* Revert last commit

* Comment front test in travis
2019-01-05 16:08:42 +05:00

88 lines
3.3 KiB
YAML

sudo: true
dist: trusty
language: generic
addons:
apt:
packages:
# GHC
- libgmp-dev
# Selenium
- xvfb
# Testcafe
- fluxbox
chrome: stable
before_install:
- # start your web application and listen on `localhost`
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=5000 http://localhost &
cache:
directories:
- $HOME/.stack
- .stack-work
- back/.stack-work
- back/static/js # Needed so that bundle.js would persist to the
# "Push Docker image" stage and beyond - without it
# the backend doesn't work and the tests don't run.
timeout: 1000
jobs:
include:
- stage: "Build backend dependencies"
before_script:
- 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:
- curl -sSL https://get.haskellstack.org/ | sh
script:
- stack --no-terminal build
- stage: "Upload a Docker image for the backend"
script:
- export BRANCH="$(echo "$TRAVIS_BRANCH" | tr '/' '-')"
- make back/travis-docker "tag=$BRANCH--back"
- docker login quay.io -u "$DOCKER_USER" -p "$DOCKER_PASS"
- docker push "quay.io/aelve/guide:$BRANCH--back"
if: type = push
- 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
- chmod +x chromedriver
- sudo mv -f chromedriver /usr/local/share/chromedriver
- 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"
- 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
script:
- stack --no-terminal test
- make back/test-db
# - stage: "Build and test the frontend"
# before_script:
# # Install dependencies
# - cd front
# - npm install
# - "export DISPLAY=:99.0"
# - "sh -e /etc/init.d/xvfb start"
# - sleep 10
# - fluxbox >/dev/null 2>&1 &
# script:
# # Run testcafe e2e testing
# - npm run test
notifications:
slack:
secure: BgQpUYFmvXrf7HVBP/fefS/8UVwES800+fT+ufgJX8b2HMx2FvaWVsdv3ErKAryLE0B3fwmvforWugTdgLO3kq66YUgSt51SNQOBLkMVGubIoQsgvr3Ernu+Wpw1DyoMkXQH9q9O9rfCIc4IwkQCEHqu5SVRqdOd5px/CHFl/ktTI22JkT8ap/Be53qjlB2U2sWUf4GxYXq0V/gGF6fDwsUwTVKFb14RfSDrOgK5Vlce2GRf3gNr1C/j7A7EHIR/Z+rNd2hvv69cFw6TRc3s39QmP8XPe3SLZPIHTZ8vRveX1SZioMeEy747r5rHd9vylEjxWtVHhvP9fOt693+woXa8ZAl5uVRgB6S4mTWLZ+LAbqhaCmDGJYr9GrrBMoqWvJiMuBX3ZvHptsAc6O2l/fxZQU3otTE++SmHkhbyoDQkcPCjXPDUi/ZlnoLc5zfMAfApcsZZ8b9t47z12H0O4uDZd2YiNPiQJ1iUA6R879LH3pcxPB3RaoWsfXzv/klkKrU/V2K4SXD9j4/bmAFArlig+dar+Dm44L/a3/G7vbU1lQIa1bG0EqB36qgUS3UCkuy2ppti/JTHpkYx7HVF2BipoCjOVvfBl9G8RkvcQIhyuCfOGm7WL1TjrKVMccIEGJKhm7OO6wOZYCBfAI5zILxi8XEJAIvBm9NywhQlwxI=