diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1976581..661e927 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,16 +17,25 @@ stages: ######## # BUILD ################################################################# - -#build_fe: -# image: node:alpine -# script: -# - echo '' -# extends: -# - .build .build: stage: build +build_fe: + image: node:alpine + script: + - cd ./frontend + - npm install + cache: + key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR + paths: + - node_modules/ + only: + changes: + - package-lock.json + extends: + - .build + + build_be: before_script: - apt-get update @@ -56,8 +65,16 @@ lint_fe: extends: - .lint - .angular-image -# needs: -# - build_fe + cache: + key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR + paths: + - node_modules/ + policy: pull-push + only: + changes: + - package-lock.json + needs: + - build_fe #lint_be: # script: @@ -77,8 +94,12 @@ test_fe: script: - cd ./frontend - npm update - - npm install puppeteer --only=dev # for chrome headless - ng test + cache: + key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR + paths: + - node_modules/ + policy: pull extends: - .test - .angular-image