]> Git — Sourcephile - gargantext.git/blob - .gitlab-ci.yml
[MERGE] 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 - 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 "LC_ALL=C.UTF-8 stack test --no-terminal --fast"
66
67 # TOOO
68
69 cabal:
70 stage: cabal
71 cache:
72 # cache per branch name
73 # key: ${CI_COMMIT_REF_SLUG}
74 paths:
75 - .stack-root/
76 - .stack-work/
77 - dist-newstyle/
78 - target
79 script:
80 - hpack
81 - nix-shell --run "LC_ALL=C.UTF-8 cabal v2-update 'hackage.haskell.org,2023-04-07T08:35:43Z' && cabal v2-build --dry-run"
82 allow_failure: true
83