]> Git — Sourcephile - gargantext.git/blob - .gitlab-ci.yml
Merge branch 'dev' into dev-test
[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: cgenie/stack-build:lts-17.13-garg
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 - build
17 - test
18
19 build:
20 cache:
21 key: "$CI_JOB_NAME"
22 paths:
23 - .stack-root/
24 - .stack-work/
25 script:
26 - stack build --no-terminal --haddock --no-haddock-deps --fast
27 - cp -R "$(stack path --local-install-root)" ./output
28 artifacts:
29 paths:
30 - ./output
31 expire_in: 1 week
32
33 test:
34 cache:
35 key: "$CI_JOB_NAME"
36 paths:
37 - .stack-root/
38 - .stack-work/
39 script:
40 - stack test --no-terminal --fast
41
42 # TOOO
43 #unit-test:
44 # stage: test
45 # script:
46 # - make test-unit
47 #
48 #int-test:
49 # stage: test
50 # script:
51 # - make test-int
52 #
53 #e2e-test:
54 # stage: test
55 # script:
56 # - make test-e2e
57 #
58
59 # If you find yourself with a non-sensical build error when you know your project should be building just fine, this fragment should help:
60 #
61 #build:
62 # stage: build
63 # script:
64 # # Clear out cache files
65 # - rm -rf .stack
66 # - rm -rf .stack-work
67 # - stack setup --system-ghc
68 # - stack install --local-bin-path target --system-ghc
69
70
71
72