-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
67 lines (64 loc) · 1.78 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# https://docs.haskellstack.org/en/stable/travis_ci/
dist: bionic
language: node_js
node_js:
- 13
before_install:
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
- echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
- sudo apt-get update -qq
- sudo apt-get install -y -qq yarn
cache:
yarn: true
directories:
- $HOME/.local/bin
- $HOME/.stack
- $TRAVIS_BUILD_DIR/.stack-work
- $TRAVIS_BUILD_DIR/bot/.stack-work
- $TRAVIS_BUILD_DIR/server/.stack-work
- $TRAVIS_BUILD_DIR/client/node_modules
- $TRAVIS_BUILD_DIR/client/build
addons:
apt:
update: true
packages:
- libgmp-dev
env:
- CI=true NODE_ENV=production
jobs:
include:
- stage: Install Stack
script:
- export DIR=~/.local/bin
- if [ ! -d "$DIR" ]; then mkdir -p ~/.local/bin; fi
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- stack setup
- stage: Build dependencies
script:
- export PATH=$HOME/.local/bin:$PATH
- stack build --dependencies-only
- stage: Build Backend
script:
- export PATH=$HOME/.local/bin:$PATH
- stack build
- stage: Test Backend
script:
- export PATH=$HOME/.local/bin:$PATH
- stack test
- stage: Install Frontend dependencies
script:
- cd ./client
- yarn install --frozen-lockfile
- stage: Audit
script:
- cd ./client
- yarn audit
- stage: Test Frontend
script:
- cd ./client
- yarn test --all --ci
- stage: Build Frontend
script:
- cd ./client
- yarn build