]> Git — Sourcephile - gargantext.git/blob - .gitlab-ci.yml
Update CI and docker image
[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:v2
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 - stack
17 - cabal
18 - test
19 - docs
20
21 stack:
22 stage: stack
23 cache:
24 # cache per branch name
25 # key: ${CI_COMMIT_REF_SLUG}
26 paths:
27 - .stack-root/
28 - .stack-work/
29 - target
30 script:
31 - echo "Building the project from '$CI_PROJECT_DIR'"
32 - nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast --dry-run"
33
34 docs:
35 stage: docs
36 cache:
37 # cache per branch name
38 # key: ${CI_COMMIT_REF_SLUG}
39 paths:
40 - .stack-root/
41 - .stack-work/
42 - target
43 script:
44 - nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --fast --dry-run"
45 - cp -R "$(stack path --local-install-root)"/doc ./output
46 artifacts:
47 paths:
48 - ./output
49 expire_in: 1 week
50 allow_failure: true
51
52 cabal:
53 stage: cabal
54 cache:
55 # cache per branch name
56 # key: ${CI_COMMIT_REF_SLUG}
57 paths:
58 - .stack-root/
59 - .stack-work/
60 - dist-newstyle/
61 - target
62 script:
63 - nix-shell --run "./bin/update-cabal-project && cabal v2-build"
64 allow_failure: false
65
66 test:
67 stage: test
68 cache:
69 # cache per branch name
70 # key: ${CI_COMMIT_REF_SLUG}
71 paths:
72 - .stack-root/
73 - .stack-work/
74 - dist-newstyle/
75 - target
76 script:
77 - nix-shell --run "cabal v2-test --test-show-details=streaming"
78