]> Git — Sourcephile - gargantext.git/blob - .gitlab-ci.yml
[ci] add .stack to cache dir
[gargantext.git] / .gitlab-ci.yml
1 # Thanks to:
2 # https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/
3 #
4 #
5 image: cgenie/stack-build:lts-18.18-garg
6
7 variables:
8 STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
9 STACK_OPTS: "--system-ghc"
10
11 #before_script:
12 #- apt-get update
13 #- apt-get install make xz-utils
14
15 stages:
16 - docs
17 - test
18
19 docs:
20 cache:
21 # cache per branch name
22 # key: ${CI_COMMIT_REF_SLUG}
23 paths:
24 - .stack
25 - .stack-root/
26 - .stack-work/
27 - target
28 script:
29 - stack build --no-terminal --haddock --no-haddock-deps --fast
30 - cp -R "$(stack path --local-install-root)"/doc ./output
31 artifacts:
32 paths:
33 - ./output
34 expire_in: 1 week
35
36 test:
37 cache:
38 # cache per branch name
39 # key: ${CI_COMMIT_REF_SLUG}
40 paths:
41 - .stack
42 - .stack-root/
43 - .stack-work/
44 - target
45 script:
46 - stack test --no-terminal --fast
47
48 # TOOO