Install npm on windows
[lsp-test.git] / .travis.yml
1 language: c
2
3 sudo: false
4
5 os:
6 - windows
7 - linux
8 - osx
9
10 dist: xenial
11
12 cache:
13   directories:
14     - .stack-work
15     - $HOME/.stack
16     - $HOME/haskell-ide-engine/.stack-work
17     - C:/Users/travis/AppData/Local/Programs/stack
18     - C:/sr
19   timeout: 1000
20
21 addons:
22   apt:
23     packages:
24       - npm
25   homebrew:
26     packages:
27       - haskell-stack
28       - npm
29
30 before_install:
31   - mkdir -p ~/.local/bin
32   - export PATH=$HOME/.local/bin:$PATH
33   - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then choco install haskell-stack nodejs npm 7zip; fi
34   - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -sSL https://get.haskellstack.org/ | sh; fi
35   - mkdir -p haskell-ide-engine
36   - cd $HOME/haskell-ide-engine
37   - git init
38   - git remote add origin https://github.com/haskell/haskell-ide-engine.git
39   - git pull origin master
40   - git checkout 1a5640f4790bde364dcd0a61617c5ca5b85b145a
41   - git submodule init
42   - git submodule sync
43   - git submodule update --init
44   - stack --no-terminal --skip-ghc-check -j2 install --stack-yaml=stack-8.6.2.yaml
45   - stack exec hoogle generate --stack-yaml=stack-8.6.2.yaml
46   - cd $TRAVIS_BUILD_DIR
47   - npm update
48   - npm i -g javascript-typescript-langserver
49
50 script:
51   - stack test