From 3ad22a8471a6655ccf44fed8612fe1cfdd6f1796 Mon Sep 17 00:00:00 2001 From: MDLeom <2809763-curben@users.noreply.gitlab.com> Date: Sat, 16 May 2020 07:09:19 +0100 Subject: [PATCH] ci(gitlab): switch npm to pnpm - workaround for hexo issue - doesn't affect renovate --- .gitlab-ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 99d5b85..7342eff 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,15 +4,18 @@ cache: # add cache to 'node_modules' for speeding up builds paths: - node_modules/ # Node modules and dependencies +variables: + NODE_ENV: "production" + test: before_script: - 'which ssh-agent || (apk update && apk add openssh-client git)' - - npm install -g npm - - npm install --only=prod + - npm install -g pnpm + - pnpm install script: - - npm install snyk && npm run snyk # Refer to "scripts" in package.json - - npm run hexo + - pnpm install snyk && pnpm run snyk # Refer to "scripts" in package.json + - pnpm run hexo # Update github mirror after_script: @@ -45,10 +48,10 @@ test: renovate: # Check dependency update before_script: - - npm install --only=prod + - npm install script: - - npm install --only=prod renovate + - npm install renovate - npm run renovate rules: