1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-26 03:08:37 +03:00
guide/.travis.yml

100 lines
4.3 KiB
YAML
Raw Normal View History

2016-11-15 13:36:26 +03:00
sudo: true
dist: trusty
2016-02-02 12:35:39 +03:00
language: generic
addons:
apt:
packages:
2016-08-17 12:12:46 +03:00
# GHC
- libgmp-dev
2016-08-17 12:12:46 +03:00
# Selenium
- xvfb
# Testcafe
- fluxbox
2017-08-13 15:59:57 +03:00
chrome: stable
before_install:
- # start your web application and listen on `localhost`
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=5000 http://localhost &
2016-02-02 12:35:39 +03:00
cache:
directories:
- $HOME/.stack
- .stack-work
2018-12-10 01:02:03 +03:00
- 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.
2018-09-02 19:09:23 +03:00
timeout: 1000
2016-02-02 12:35:39 +03:00
2018-09-02 20:45:34 +03:00
jobs:
2016-02-02 12:35:39 +03:00
include:
2018-12-10 01:02:03 +03:00
- stage: "Build backend dependencies"
2018-09-02 20:45:34 +03:00
before_script:
- curl -sSL https://get.haskellstack.org/ | sh
2018-09-02 20:45:34 +03:00
script:
- stack --no-terminal --install-ghc test --no-run-tests --dependencies-only
- stage: "Build the backend"
2018-09-02 20:45:34 +03:00
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
Task/log monad (#264) * monad DiT * addition of monad DiT to gaider * add deriving * fix of exceptions * Logger.hs * logging * configs * fix * cathing of exception * logger structure * configs fixes * log format * add time format to config * add logs * add logs * add show instances to db actions * add log to matomo * add emptyOnExceptyon * fixing of tests * add test for logs * add test for api * add test for api * sdd tests to api * fix of tests * fix of tests * fix of errors * add api tests * add new tests for log * add new tests for log * add new tests for log * add new tests for log & api * ordering of API.hs * add test of traits to api * fixes to tests * fixes of test * add atributes to log * attributes to logs * fix to log * Fix proposals * Fix error level style * Try to fix travis tests * Add comment to servant error log * Revert openFile to check travis tests * Abstract withTempFile * Rework the way handlers are logged * Fix typos * Don't use pack * Add explicit export lists and warn about missing export lists * Fix comments * Get rid of useless H. * Make export lists consistent * Rewrite config comments * Log to stderr by default, not to /var/log/guide.log * Don't use module X * Rewrite Guider.Logger.Init slightly * No {- -} comments * Separate logTests from webspec module * Swap throwM with Di.Core.throw * Fix logging * No more .ghci * Formatting, etc * Remove loggers we're not going to use * Comment * Typo * Comments * searchQuery -> query It's called "query" in the API * Rename * More logging * Reorder things * Fix test compilation * Api -> ApiSpec * Remove constantly failing footer test * Rename logTest * Fix failing log test * TODO * We don't do caching anymore * Increase test time for move item up * Add haddocked test * Add uncommented function for test * Up haddock test * Add quotes * Remove ':' * Add curl stack * Delete test function * Up beforeHaddocked to 251 * Increase second threadDelay to 1 million * Check test fixes * Remove commented code * Return bracket function * Add comment
2019-02-26 08:40:42 +03:00
# Our goal is full documented code with ZERO undocumented functions.
# The next guard warns if a commit increased undocumented limit out 251.
- stage: "Assert test undocumented no more then 251"
before_script:
- curl -sSL https://get.haskellstack.org/ | sh
script:
- stack haddock --fast --no-haddock-deps --no-terminal --haddock-arguments='--no-warnings' 2> haddock.log
- awk '/\(src\//' haddock.log | awk 'END { print NR }' > unDocumentedAfter
- echo "unDocumentedBefore == 251"
- awk '{ print "unDocumentedAfter == " $1 }' unDocumentedAfter
- bash -c 'if [[ 251 < `cat unDocumentedAfter` ]]; then >&2 echo "FAIL. The current limit is 251 of undocumented top-level definitions, but unDocumentedAfter $(`cat unDocumentedAfter`) is out of limit. Please, add comment to top-level undocumented definitions!"; exit 1; else echo "OK. unDocumentedBefore >= unDocumentedAfter $(`cat unDocumentedAfter`). Yes, it is convenience to have documented code!"; fi'
Task/log monad (#264) * monad DiT * addition of monad DiT to gaider * add deriving * fix of exceptions * Logger.hs * logging * configs * fix * cathing of exception * logger structure * configs fixes * log format * add time format to config * add logs * add logs * add show instances to db actions * add log to matomo * add emptyOnExceptyon * fixing of tests * add test for logs * add test for api * add test for api * sdd tests to api * fix of tests * fix of tests * fix of errors * add api tests * add new tests for log * add new tests for log * add new tests for log * add new tests for log & api * ordering of API.hs * add test of traits to api * fixes to tests * fixes of test * add atributes to log * attributes to logs * fix to log * Fix proposals * Fix error level style * Try to fix travis tests * Add comment to servant error log * Revert openFile to check travis tests * Abstract withTempFile * Rework the way handlers are logged * Fix typos * Don't use pack * Add explicit export lists and warn about missing export lists * Fix comments * Get rid of useless H. * Make export lists consistent * Rewrite config comments * Log to stderr by default, not to /var/log/guide.log * Don't use module X * Rewrite Guider.Logger.Init slightly * No {- -} comments * Separate logTests from webspec module * Swap throwM with Di.Core.throw * Fix logging * No more .ghci * Formatting, etc * Remove loggers we're not going to use * Comment * Typo * Comments * searchQuery -> query It's called "query" in the API * Rename * More logging * Reorder things * Fix test compilation * Api -> ApiSpec * Remove constantly failing footer test * Rename logTest * Fix failing log test * TODO * We don't do caching anymore * Increase test time for move item up * Add haddocked test * Add uncommented function for test * Up haddock test * Add quotes * Remove ':' * Add curl stack * Delete test function * Up beforeHaddocked to 251 * Increase second threadDelay to 1 million * Check test fixes * Remove commented code * Return bracket function * Add comment
2019-02-26 08:40:42 +03:00
- stage: "Test the backend"
before_script:
- curl -sSL https://get.haskellstack.org/ | sh
2018-09-02 20:45:34 +03:00
# Install chromedriver
- wget http://chromedriver.storage.googleapis.com/2.45/chromedriver_linux64.zip
2018-09-02 20:45:34 +03:00
- 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 &
2018-09-02 20:45:34 +03:00
- sleep 15
script:
- stack --no-terminal test
2018-12-10 01:02:03 +03:00
- make back/test-db
2017-01-31 03:18:33 +03:00
# - 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
2017-01-31 03:18:33 +03:00
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=