From 0654735f7c935c2d687a36c13f4bcd6ed5179f63 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 22 Aug 2022 17:42:11 +0200 Subject: [PATCH] Added node_modules cache to CI --- .gitlab-ci.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 48f7067..0a533de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,17 +5,32 @@ stages: - build - package +cache: + - key: + files: + - package-lock.json + paths: + - node_modules + - key: + files: + - frontend/package-lock.json + paths: + - frontend/node_modules + +before_script: + - npm ci + - cd frontend + - npm ci + test_backend: stage: test script: - - npm ci - npm run lint test_frontend: stage: test script: - cd frontend - - npm ci - npm run lint build_backend: @@ -24,7 +39,6 @@ build_backend: - job: test_backend artifacts: false script: - - npm ci - npm webpack artifacts: paths: @@ -38,7 +52,6 @@ build_frontend: artifacts: false script: - cd frontend - - npm ci - npm run lint artifacts: paths: @@ -47,6 +60,7 @@ build_frontend: package_server: stage: package + cache: [] needs: - job: build_backend artifacts: true