From 06b67760235919c8c6a8daa161fa238fff7fb4b0 Mon Sep 17 00:00:00 2001 From: Andreas <andreksv@ntnu.no> Date: Thu, 18 Apr 2024 09:47:32 +0200 Subject: [PATCH] test/Update .gitlab-ci.yml --- .gitlab-ci.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95e7b02..77f9fb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,26 +1,22 @@ +image: node:alpine # Much smaller than other variants, faster and more resource effective + stages: - - install_dependencies - - lint - - build_project + - install + - build cache: - key: "${CI_COMMIT_REF_SLUG}" # Branch-specific cache keys to have separate caches across branches. - paths: + key: "${CI_COMMIT_REF_SLUG}" # Branch-specific cache keys to have separate caches across branches. + paths: - node_modules/ install_dependencies: - stage: install_dependencies - script: - - npm ci --prefer-offline # --prefer-offline to make it prefer using locally cached packages rather than downloading - -lint: - stage: lint + stage: install + image: node:latest script: - - npm run lint - allow_failure: true + - npm install build_project: - stage: build_project + stage: build + image: node:latest script: - npm run build - -- GitLab