diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bae7ac646d19e14a81f34e411e3f3ab2337960ff..91d186aaed1493bc9270ec426642b987cba4fdf7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,10 @@ image: jhipster/jhipster:v7.6.0 cache: - - key: '$CI_COMMIT_REF_NAME' - paths: - - .maven/ - - key: - files: - - package-lock.json - paths: - - node_modules/ - + key: '$CI_COMMIT_REF_NAME' + paths: + - .maven/ stages: - - setup - lint - build - test @@ -19,16 +12,10 @@ stages: - package - release - deploy - before_script: - export NG_CLI_ANALYTICS="false" - export MAVEN_USER_HOME=`pwd`/.maven -npm-install: - stage: setup - script: - - npm install - checkstyle: stage: lint script: @@ -38,18 +25,20 @@ checkstyle: prettier: stage: lint script: + - npm install - npm run prettier:check allow_failure: true - needs: [npm-install] + needs: [] eslint: stage: lint script: + - npm install # eslint exits 0 on warnings, this is a workaround to exit 1 when warnings are present. - 'npm run lint | tee lint.log' - "! grep -qE '✖ [0-9]+ problem' lint.log" allow_failure: true - needs: [npm-install] + needs: [] maven-compile: stage: build @@ -91,6 +80,7 @@ maven-test: frontend-test: stage: test script: + - npm install - npm test artifacts: reports: @@ -101,7 +91,7 @@ frontend-test: when: always expire_in: 1 day allow_failure: true - needs: [npm-install] + needs: [] sonar-analyze: stage: analyze