2 # https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/
5 image: adinapoli/gargantext:v1
8 STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"
9 STACK_OPTS: "--system-ghc"
13 #- apt-get install make xz-utils
24 # cache per branch name
25 # key: ${CI_COMMIT_REF_SLUG}
31 - echo "Building the project from '$CI_PROJECT_DIR'"
33 - nix-shell --run "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast"
38 # cache per branch name
39 # key: ${CI_COMMIT_REF_SLUG}
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
57 # cache per branch name
58 # key: ${CI_COMMIT_REF_SLUG}
65 - nix-shell --run "stack test --no-terminal --fast"
70 # FIXME(adinapoli) A temporary hack until we switch to cabal 3.10.1.0 properly
73 # cache per branch name
74 # key: ${CI_COMMIT_REF_SLUG}
82 - nix-shell --run "./bin/update-cabal-project && cabal v2-build --dry-run"