]> Git — Sourcephile - gargantext.git/blob - .gitlab-ci.yml
Merge remote-tracking branch 'origin/adinapoli/issue-188' into dev
[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: adinapoli/gargantext:v1
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 - deps
17 - docs
18 - test
19
20 deps:
21 cache:
22 # cache per branch name
23 # key: ${CI_COMMIT_REF_SLUG}
24 paths:
25 - .stack
26 - .stack-root/
27 - .stack-work/
28 - target
29 script:
30 - stack --nix build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
31
32 docs:
33 cache:
34 # cache per branch name
35 # key: ${CI_COMMIT_REF_SLUG}
36 paths:
37 - .stack
38 - .stack-root/
39 - .stack-work/
40 - target
41 script:
42 - stack --nix build --no-terminal --haddock --no-haddock-deps --fast
43 - cp -R "$(stack path --local-install-root)"/doc ./output
44 artifacts:
45 paths:
46 - ./output
47 expire_in: 1 week
48
49 test:
50 cache:
51 # cache per branch name
52 # key: ${CI_COMMIT_REF_SLUG}
53 paths:
54 - .stack
55 - .stack-root/
56 - .stack-work/
57 - target
58 script:
59 - stack --nix test --no-terminal --fast
60
61 # TOOO
62
63 cabal:
64 cache:
65 # cache per branch name
66 # key: ${CI_COMMIT_REF_SLUG}
67 paths:
68 - .stack
69 - .stack-root/
70 - .stack-work/
71 - target
72 script:
73 - nix-shell && hpack && cabal v2-build --dry-run
74