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