Add code coverage
[lsp-test.git] / .travis.yml
1 language: haskell
2 ghc:
3   - "8.2.2"
4   - "8.4.3"
5
6 sudo: false
7
8 # Caching so the next build will be fast too.
9 cache:
10   directories:
11   # - $HOME/.stack
12   # - $HOME/haskell-ide-engine/.stack-work
13
14 addons:
15   apt:
16     packages:
17     - npm
18
19 before_install:
20   # Download and unpack the stack executable
21   # - mkdir -p ~/.local/bin
22   # - export PATH=$HOME/.local/bin:$PATH
23   # - travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
24     
25   - cd $HOME
26   # It's ok to fail
27   - mkdir -p haskell-ide-engine
28   - cd haskell-ide-engine
29   - git init
30   - git remote add origin https://github.com/Bubba/haskell-ide-engine.git
31   - git pull origin heirarchal-document-symbols
32   - git submodule init
33   - git submodule sync
34   - git submodule update
35   - cabal new-configure
36   - cabal new-build -j2
37   # - export PATH=$HOME/haskell-ide-engine/dist-newstyle/build/*/ghc-*/haskell-ide-engine-*/x/hie/build:$PATH
38   - cp `find dist-newstyle/ -name hie -type f | xargs -x ls -t | head -n1` $HOME/.cabal/bin/
39   # - stack --no-terminal --skip-ghc-check install -j2
40   # - stack exec hoogle generate
41   - cabal install hoogle
42   - hoogle generate
43   - cd $TRAVIS_BUILD_DIR
44   - npm update
45   - npm i -g javascript-typescript-langserver
46
47 script:
48   - cabal configure --enable-tests --enable-coverage
49   - cabal build
50   - cabal test --show-details=streaming
51 after_script:
52   - cabal install codecov-haskell
53   - codecov-haskell [options] tests