From b3cfd59cc00092331525a9f2a97b37834fad2ce6 Mon Sep 17 00:00:00 2001 From: Andreas <andreksv@ntnu.no> Date: Thu, 18 Apr 2024 09:00:42 +0200 Subject: [PATCH] feature/Updated .gitlab-ci.yml to include job for lint --- .gitlab-ci.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4450c01..5d10d76 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,20 +1,35 @@ +image: node:alpine # Much smaller than other variants, faster and more resource effective + +variables: + NPM_CONFIG_PROGRESS: 'false' # Make npm less verbose + + stages: - - install - - build + - install_dependencies + - lint + - build_project cache: + key: "node repository" # Static Cache Key to keep cache across branches paths: - node_modules/ - key: "$CI_BUILD_REF_NAME" # Separate cache for each branch install_dependencies: - stage: install + stage: install_dependencies image: node:latest script: - npm install +lint: + stage: lint + image: node:latest + script: + - npm run lint + allow_failure: true + build_project: - stage: build + stage: build_project image: node:latest script: - - npm run build \ No newline at end of file + - npm run build + -- GitLab