1
1
mirror of https://github.com/aelve/guide.git synced 2025-01-03 19:19:11 +03:00

Migrate to LTS 13 and Ubuntu Xenial (#302)

This commit is contained in:
Artyom Kazak 2019-06-26 11:35:52 +03:00 committed by GitHub
parent 0955b582e3
commit 1b22041506
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 18 deletions

View File

@ -1,11 +1,14 @@
sudo: true
dist: trusty
dist: xenial
language: generic
addons:
chrome: stable
services:
- xvfb
before_install:
- # start your web application and listen on `localhost`
- google-chrome-stable --headless --disable-gpu --remote-debugging-port=5000 http://localhost &
@ -77,7 +80,7 @@ jobs:
- stage: "Test the backend"
before_script:
- sudo apt-get install -y libgmp-dev xvfb fluxbox
- sudo apt-get install -y libgmp-dev fluxbox
- curl -sSL https://get.haskellstack.org/ | sh
- stack setup
# Install chromedriver
@ -88,8 +91,6 @@ 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"
- 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
@ -100,8 +101,6 @@ jobs:
- rm -rf $HOME/.stack/programs # GHC is faster to install than to cache
# - stage: "Test the frontend"
# - "export DISPLAY=:99.0"
# - "sh -e /etc/init.d/xvfb start"
# - sleep 10
# - fluxbox >/dev/null 2>&1 &
# script:

View File

@ -36,8 +36,10 @@ 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 Trusty (the OS used in the
# Docker file)
# the binary has to have been compiled on Ubuntu Xenial (the OS used in the
# Docker file).
#
# Assumes Guide has been built with Stack.
.PHONY: back/travis-docker
back/travis-docker:
rm -rf docker/back/files && mkdir docker/back/files
@ -45,7 +47,7 @@ back/travis-docker:
docker/back/files/state
(cd docker/back/files/state && gzip -d *.gz)
rm -rf docker/back/files/state/.git
cp .stack-work/install/*/*/*/bin/guide docker/back/files/
cp "$$(stack path --local-install-root)/bin/guide" docker/back/files/
cp -R back/{static,templates} docker/back/files/
docker build docker/back -t quay.io/aelve/guide:$(tag)
rm -rf docker/back/files

View File

@ -5,6 +5,8 @@
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-orphans #-} -- for "instance MonadFail WD"
module Selenium
(
module Test.Hspec.WebDriver,
@ -58,6 +60,7 @@ where
import Imports hiding ((:|), catch)
-- Monads
import Control.Monad.Loops
import qualified Control.Monad.Fail as Fail
-- Containers
import qualified Data.Set as Set
-- Text
@ -448,3 +451,12 @@ shouldBeHidden s = do
wait_delay :: Double
wait_delay = 10
----------------------------------------------------------------------------
-- Orphan instances
----------------------------------------------------------------------------
instance Fail.MonadFail WD where
-- Don't get confused!
-- This line means "MonadFail.fail = Monad.fail"
fail = fail

View File

@ -1,4 +1,4 @@
FROM ubuntu:trusty
FROM ubuntu:xenial
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

View File

@ -1,4 +1,4 @@
resolver: lts-12.4
resolver: lts-13.26
packages:
- back/
@ -17,13 +17,22 @@ extra-deps:
- fmt-0.6
- cmark-sections-0.3.0.1
- acid-state-0.14.3
- servant-swagger-ui-0.3.0.3.13.2
- servant-0.14.1
- servant-swagger-ui-core-0.3.1
- swagger2-2.3
- stm-containers-0.2.16
- lzma-clib-5.2.2
- regex-1.0.1.5
# Old versions from LTS 12+ (can and should be upgraded)
- megaparsec-6.5.0
- wai-middleware-metrics-0.2.4
- servant-0.15
- servant-server-0.15
# Older version due to megaparsec
- neat-interpolation-0.3.2.2
# Older version due to stm-containers
- focus-0.1.5.2
# We pin the precise versions of 'highlighting-kate' and 'cmark-highlight'
# because the frontend has copied a stylesheet from 'highlighting-kate'. If
# the version changes, we also have to update the stylesheet on the
@ -36,17 +45,19 @@ extra-deps:
- di-1.2
- di-monad-1.3
- di-core-1.0.3
- df1-0.3
- df1-0.3.1
- di-df1-1.0.2
- di-handle-1.0.1
- git: https://github.com/aelve/stache-plus
commit: c8097fb33df6ba738fc7b7c8d09aaebdb02a9782
commit: 4c40c1297873cd5bb24a4aeb7c59b7a7f67ca671
- git: https://github.com/aelve/safecopy-migrate
commit: 3971922c75ce2ca751b3da1653fefa109b746e21
# Fork of 'servant-swagger' with some changes (see its README)
- git: https://github.com/aelve/servant-swagger
commit: 09e124d03606ec54d50e3029ea86d096575d545c
commit: ea54349ffbe474c70601b6d1f7f71535b77c73ae
# Fork of 'hspec-webdriver' that builds
- git: https://github.com/neongreen/webdriver-utils