From 284d1399684849beb24830c0c58e1a4604915a18 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 10 Jun 2022 16:56:07 +0100 Subject: [PATCH] Add pip cache --- .gitlab-ci.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f3ede23..391fa80 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,12 +6,11 @@ static: image: node:alpine stage: build cache: - key: ${CI_COMMIT_REF_SLUG} + key: npm-$CI_COMMIT_REF_SLUG paths: - - .npm - - .cache + - "$CI_PROJECT_DIR/.npm-cache" script: - - npm ci --cache .npm --prefer-offline + - npm ci --cache .npm-cache --prefer-offline - npm run build artifacts: name: '$CI_JOB_ID-node_modules' @@ -23,6 +22,12 @@ static: pip: image: python:3.9-slim stage: build + variables: + PIP_CACHE_DIR: $CI_PROJECT_DIR/.pip-cache + cache: + key: pip-$CI_COMMIT_REF_SLUG + paths: + - "$CI_PROJECT_DIR/.pip-cache" script: - python -m venv env - source env/bin/activate