diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54ac88c31..1585e376e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,6 +58,23 @@ node modules: retry: 2 interruptible: true +backend dependencies: + stage: setup + cache: + - &stack-cache + key: default-stack + paths: + - ${HOME}/.stack/ + - .stack-work/ + script: + - "nix shell .#gnumake .#stack .#coreutils --command make backend-dependencies" + before_script: *nix-before + artifacts: + paths: + - ${HOME}/.stack/ + retry: 2 + interruptible: true + frontend lint: stage: lint script: @@ -96,21 +113,21 @@ frontend build: backend lint: stage: lint + cache: + - *stack-cache script: - - "nix shell .#gnumake .#coreutils .#stack --command make CI=1 backend-lint" + - "nix shell .#gnumake .#stack --command make CI=1 backend-lint" before_script: *nix-before + needs: + - job: backend dependencies + artifacts: true retry: 2 interruptible: true backend build: stage: build cache: - - &stack-cache - key: default-stack - paths: - - .stack/ - - .stack-work/ - + - *stack-cache script: - "nix shell .#gnumake .#coreutils .#stack --command make CI=1 backend-build" - cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint @@ -119,6 +136,8 @@ backend build: needs: - job: node modules # transitive artifacts: false + - job: backend dependencies + artifacts: true - job: frontend lint # transitive artifacts: false - job: frontend build