]> Git — Sourcephile - gargantext.git/blob - .gitlab-ci.yml
Add .clippy.dhall to package.yaml, force hpack installation in update-cabal-project...
[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 - test
18 - docs
19 - cabal
20
21 deps:
22 stage: deps
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 - hpack
33 - nix-shell --run "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast"
34
35 docs:
36 stage: docs
37 cache:
38 # cache per branch name
39 # key: ${CI_COMMIT_REF_SLUG}
40 paths:
41 - .stack-root/
42 - .stack-work/
43 - target
44 script:
45 - hpack
46 - nix-shell --run "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --fast"
47 - cp -R "$(stack path --local-install-root)"/doc ./output
48 artifacts:
49 paths:
50 - ./output
51 expire_in: 1 week
52 allow_failure: true
53
54 test:
55 stage: test
56 cache:
57 # cache per branch name
58 # key: ${CI_COMMIT_REF_SLUG}
59 paths:
60 - .stack-root/
61 - .stack-work/
62 - target
63 script:
64 - hpack
65 - nix-shell --run "stack test --no-terminal --fast"
66
67 # TOOO
68
69 cabal:
70 # FIXME(adinapoli) A temporary hack until we switch to cabal 3.10.1.0 properly
71 stage: cabal
72 cache:
73 # cache per branch name
74 # key: ${CI_COMMIT_REF_SLUG}
75 paths:
76 - .stack-root/
77 - .stack-work/
78 - dist-newstyle/
79 - target
80 script:
81 - hpack
82 - nix-shell --run "./bin/update-cabal-project && cabal v2-build --dry-run"
83 allow_failure: false
84