Few CI improvements
This commit is contained in:
+29
-10
@@ -1,36 +1,40 @@
|
|||||||
stages:
|
stages:
|
||||||
- setup
|
- setup
|
||||||
- qa
|
- lint
|
||||||
- test
|
- test
|
||||||
|
- build
|
||||||
- publish
|
- publish
|
||||||
- deploy
|
- deploy
|
||||||
|
|
||||||
cache:
|
install:
|
||||||
paths:
|
|
||||||
- node_modules/
|
|
||||||
- dist/
|
|
||||||
|
|
||||||
setup:
|
|
||||||
image: node:12
|
image: node:12
|
||||||
stage: setup
|
stage: setup
|
||||||
script:
|
script:
|
||||||
- npm ci
|
- npm ci
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- node_modules
|
||||||
|
expire_in: 1 week
|
||||||
|
|
||||||
|
|
||||||
es:lint:
|
es:lint:
|
||||||
image: node:12
|
image: node:12
|
||||||
stage: qa
|
needs: ["install"]
|
||||||
|
stage: lint
|
||||||
script:
|
script:
|
||||||
- npm run lint:es
|
- npm run lint:es
|
||||||
|
|
||||||
sass:lint:
|
sass:lint:
|
||||||
image: node:12
|
image: node:12
|
||||||
stage: qa
|
needs: ["install"]
|
||||||
|
stage: lint
|
||||||
script:
|
script:
|
||||||
- npm run lint:sass
|
- npm run lint:sass
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: node:12
|
image: node:12
|
||||||
stage: qa
|
needs: ["install"]
|
||||||
|
stage: lint
|
||||||
script:
|
script:
|
||||||
- API_URL=http://web.sik.party:8000/api npm run build
|
- API_URL=http://web.sik.party:8000/api npm run build
|
||||||
|
|
||||||
@@ -42,15 +46,30 @@ build:
|
|||||||
|
|
||||||
test:e2e:
|
test:e2e:
|
||||||
image: circleci/node:12-browsers
|
image: circleci/node:12-browsers
|
||||||
|
needs: ["install"]
|
||||||
stage: test
|
stage: test
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
script:
|
script:
|
||||||
- API_URL=http://web.sik.party:8000/api npm run test:e2e
|
- API_URL=http://web.sik.party:8000/api npm run test:e2e
|
||||||
|
|
||||||
|
build:
|
||||||
|
image: node:12
|
||||||
|
needs: ["install"]
|
||||||
|
stage: build
|
||||||
|
script:
|
||||||
|
- npm run build
|
||||||
|
dependencies:
|
||||||
|
- install
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- dist
|
||||||
|
expire_in: 1 week
|
||||||
|
|
||||||
publish:dev:
|
publish:dev:
|
||||||
stage: publish
|
stage: publish
|
||||||
image: docker:stable
|
image: docker:stable
|
||||||
|
needs: ["build", "test:e2e", "es:lint", "sass:lint"]
|
||||||
services:
|
services:
|
||||||
- docker:stable-dind
|
- docker:stable-dind
|
||||||
only:
|
only:
|
||||||
|
|||||||
Reference in New Issue
Block a user