chore(gitlab-ci): add backend dependencies setup with (more) proper caching
This commit is contained in:
parent
e0c2fb9caf
commit
e4cf6ee79c
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user