Update .gitlab-ci.yml
This commit is contained in:
parent
2979e40f21
commit
43340bcaf6
@ -1,13 +1,5 @@
|
||||
default:
|
||||
image: fpco/stack-build:lts-13.21
|
||||
|
||||
cache:
|
||||
key: "${CI_COMMIT_REF_SLUG}"
|
||||
paths:
|
||||
- .stack
|
||||
- .stack-work
|
||||
- node_modules
|
||||
- static/bundles
|
||||
|
||||
variables:
|
||||
STACK_ROOT: "${CI_PROJECT_DIR}/.stack"
|
||||
@ -19,28 +11,39 @@ stages:
|
||||
- yesod:build
|
||||
- test
|
||||
|
||||
container setup:
|
||||
stage: .pre
|
||||
script:
|
||||
- apt-get update
|
||||
- apt-get install -y --no-install-recommends build-essential nodejs chromium-browser
|
||||
- ln -s $(which g++-7) $(dirname $(which g++-7))/g++
|
||||
- npm install -g n
|
||||
- n stable
|
||||
|
||||
npm install:
|
||||
stage: setup
|
||||
script:
|
||||
- npm install
|
||||
needs:
|
||||
- container setup
|
||||
before_script: &npm
|
||||
- apt-get update
|
||||
- npm install -g n
|
||||
- n stable
|
||||
cache:
|
||||
key: "${CI_COMMIT_REF_SLUG}"
|
||||
paths:
|
||||
- node_modules
|
||||
artifacts:
|
||||
paths:
|
||||
- node_modules/
|
||||
name: "${CI_JOB_NAME}"
|
||||
expire_in: "1 day"
|
||||
|
||||
frontend:build:
|
||||
stage: frontend:build
|
||||
script:
|
||||
- npm run frontend:build
|
||||
before_script:
|
||||
- *npm
|
||||
needs:
|
||||
- npm install
|
||||
artifacts:
|
||||
paths:
|
||||
- static/bundles/
|
||||
name: "${CI_JOB_NAME}"
|
||||
expire_in: "1 day"
|
||||
dependencies:
|
||||
- npm install
|
||||
|
||||
yesod:build:dev:
|
||||
stage: yesod:build
|
||||
@ -48,10 +51,29 @@ yesod:build:dev:
|
||||
- stack build --copy-bins --local-bin-path $(pwd)/bin --fast --flag uniworx:-library-only --flag uniworx:dev --flag uniworx:pedantic
|
||||
needs:
|
||||
- frontend:build
|
||||
before_script:
|
||||
- ln -s $(which g++-7) $(dirname $(which g++-7))/g++
|
||||
cache:
|
||||
key: "${CI_COMMIT_REF_SLUG}"
|
||||
paths:
|
||||
- .stack
|
||||
- .stack_work
|
||||
artifacts:
|
||||
paths:
|
||||
- bin/uniworx
|
||||
name: "${CI_JOB_NAME}"
|
||||
expire_in: "1 week"
|
||||
dependencies:
|
||||
- frontend:build
|
||||
|
||||
frontend:test:
|
||||
stage: test
|
||||
script:
|
||||
- npm run frontend:test
|
||||
needs:
|
||||
- frontend:build
|
||||
- frontend:build
|
||||
before_script:
|
||||
- *npm
|
||||
- apt-get install -y --no-install-recommends chromium-browser
|
||||
dependencies:
|
||||
- npm install
|
||||
Loading…
Reference in New Issue
Block a user