update gitlab-ci

This commit is contained in:
Johannes Loher 2020-12-23 20:15:28 +01:00
parent 5d89fbbd46
commit 7ae8780d63

View file

@ -1,24 +1,47 @@
image: node:latest
stages:
- test
- Preparation
- Build
- Test
lint:
stage: test
before_script:
- npm install
Install Dependencies:
stage: Preparation
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
script:
- npm run lint
- npm ci
only:
changes:
- package-lock.json
compile:
stage: test
before_script:
- npm install
Build:
stage: Build
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
policy: pull
script:
- npm run build
# test:
# stage: test
# before_script:
# - npm install
Lint:
stage: Test
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
policy: pull
script:
- npm run lint
# Test:
# stage: Test
# cache:
# key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
# paths:
# - node_modules/
# policy: pull
# script:
# - npm test