# Thanks to: # https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/ # # image: cgenie/stack-build:lts-17.13-garg variables: STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root" STACK_OPTS: "--system-ghc" #before_script: #- apt-get update #- apt-get install make xz-utils stages: - docs - test docs: cache: key: "$CI_JOB_NAME" paths: - .stack-root/ - .stack-work/ script: - stack build --no-terminal --haddock --no-haddock-deps --fast - cp -R "$(stack path --local-install-root)"/doc ./output artifacts: paths: - ./output expire_in: 1 week test: cache: key: "$CI_JOB_NAME" paths: - .stack-root/ - .stack-work/ script: - stack test --no-terminal --fast # TOOO #unit-test: # stage: test # script: # - make test-unit # #int-test: # stage: test # script: # - make test-int # #e2e-test: # stage: test # script: # - make test-e2e # # If you find yourself with a non-sensical build error when you know your project should be building just fine, this fragment should help: # #build: # stage: build # script: # # Clear out cache files # - rm -rf .stack # - rm -rf .stack-work # - stack setup --system-ghc # - stack install --local-bin-path target --system-ghc