diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d08592c0eae58e8496be542b4970ff477b49c71c..ef68e27b67db61018f81e22eb6d5bba9401b10d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,51 +1,42 @@ image: node:latest -cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - node_modules/ - - dist/ - stages: - - setup - test + - dependencies - build - publish -npm ci: - stage: setup +code quality: + stage: test script: - npm ci + - npm run lint -code quality: +test & coverage: stage: test script: - - npm run lint + - npm it + coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/' + artifacts: + paths: + - coverage/ npm outdated: - stage: test + stage: dependencies script: - npm outdated allow_failure: true security scan: - stage: test + stage: dependencies script: - npm audit --only=prod allow_failure: true -test & coverage: - stage: test - script: - - npm test - coverage: '/All files[^|]*\|[^|]*\s+([\d\.]+)/' - artifacts: - paths: - - coverage/ - rollup build: stage: build script: + - npm ci - npm run build artifacts: paths: @@ -61,6 +52,7 @@ coverage report: artifacts: paths: - public + expire_in: 3 months only: - master environment: