# Thanks to: # https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/ # # image: adinapoli/gargantext:v2 variables: STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root" STACK_OPTS: "--system-ghc" #before_script: #- apt-get update #- apt-get install make xz-utils stages: - stack - cabal - test - docs stack: stage: stack cache: # cache per branch name # key: ${CI_COMMIT_REF_SLUG} paths: - .stack-root/ - .stack-work/ - target script: - echo "Building the project from '$CI_PROJECT_DIR'" - nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast --dry-run" docs: stage: docs cache: # cache per branch name # key: ${CI_COMMIT_REF_SLUG} paths: - .stack-root/ - .stack-work/ - target script: - nix-shell --run "stack build --no-terminal --haddock --no-haddock-deps --fast --dry-run" - cp -R "$(stack path --local-install-root)"/doc ./output artifacts: paths: - ./output expire_in: 1 week allow_failure: true cabal: stage: cabal cache: # cache per branch name # key: ${CI_COMMIT_REF_SLUG} paths: - .stack-root/ - .stack-work/ - dist-newstyle/ - target script: - nix-shell --run "./bin/update-cabal-project && cabal v2-build" allow_failure: false test: stage: test cache: # cache per branch name # key: ${CI_COMMIT_REF_SLUG} paths: - .stack-root/ - .stack-work/ - dist-newstyle/ - target script: - nix-shell --run "cabal v2-test --test-show-details=streaming"