# Thanks to: # https://vadosware.io/post/zero-to-continuous-integrated-testing-a-haskell-project-with-gitlab/ # # image: adinapoli/gargantext:v1 variables: STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root" STACK_OPTS: "--system-ghc" #before_script: #- apt-get update #- apt-get install make xz-utils stages: - deps - test - docs - cabal deps: stage: deps 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 "LC_ALL=C.UTF-8 stack build --no-terminal --haddock --no-haddock-deps --only-dependencies --fast" docs: stage: docs cache: # cache per branch name # key: ${CI_COMMIT_REF_SLUG} paths: - .stack-root/ - .stack-work/ - target script: - nix-shell --run "LC_ALL=C.UTF-8 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 allow_failure: true test: stage: test cache: # cache per branch name # key: ${CI_COMMIT_REF_SLUG} paths: - .stack-root/ - .stack-work/ - target script: - nix-shell --run "stack test --no-terminal --fast" # TOOO cabal: # FIXME(adinapoli) A temporary hack until we switch to cabal 3.10.1.0 properly 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 --dry-run" allow_failure: false