]> Git — Sourcephile - gargantext.git/blob - .gitlab-ci.yml
Merge remote-tracking branch 'origin/dev-phyloDebug' into 206-dev-phylo
[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 - cabal
18 - test
19 - docs
20
21 deps:
22 stage: deps
23 cache:
24 # cache per branch name
25 # key: ${CI_COMMIT_REF_SLUG}
26 paths:
27 - /nix
28 - .stack
29 - .stack-root/
30 - .stack-work/
31 - target
32 script:
33 - echo "Building the project from '$CI_PROJECT_DIR'"
34 - nix-shell && export LC_ALL=C.UTF-8 && stack -v build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast
35
36 docs:
37 stage: docs
38 cache:
39 # cache per branch name
40 # key: ${CI_COMMIT_REF_SLUG}
41 paths:
42 - /nix
43 - .stack
44 - .stack-root/
45 - .stack-work/
46 - target
47 script:
48 - nix-shell && export LC_ALL=C.UTF-8 && stack build --no-terminal --haddock --no-haddock-deps --fast
49 - cp -R "$(stack path --local-install-root)"/doc ./output
50 artifacts:
51 paths:
52 - ./output
53 expire_in: 1 week
54
55 test:
56 stage: test
57 cache:
58 # cache per branch name
59 # key: ${CI_COMMIT_REF_SLUG}
60 paths:
61 - /nix
62 - .stack
63 - .stack-root/
64 - .stack-work/
65 - target
66 script:
67 - nix-shell && export LC_ALL=C.UTF-8 && stack test --no-terminal --fast
68
69 # TOOO
70
71 cabal:
72 stage: cabal
73 cache:
74 # cache per branch name
75 # key: ${CI_COMMIT_REF_SLUG}
76 paths:
77 - /nix
78 - .stack
79 - .stack-root/
80 - .stack-work/
81 - .local/
82 - .cabal/
83 - target
84 script:
85 - nix-shell && export LC_ALL=C.UTF-8 && hpack && cabal v2-build --dry-run
86