Skip to content
Snippets Groups Projects
Unverified Commit ab24bcab authored by Alexander Harkness's avatar Alexander Harkness
Browse files

Optimise npm execution in pipeline to reduce deploy time

parent 9996128a
No related branches found
No related tags found
No related merge requests found
default: default:
image: node:12 image: node:12
before_script:
- npm ci
stages: stages:
- source_check - deps
- check
- build - build
- test - test
- deploy - deploy
node_install:
stage: deps
script:
- npm ci --only=prod
artifacts:
paths:
- node_modules
check_format: check_format:
stage: source_check stage: check
script: script:
- npm ci
- npx prettier --ignore-path .gitignore --check "**/*.{html,js,json,md}" - npx prettier --ignore-path .gitignore --check "**/*.{html,js,json,md}"
lint: lint:
stage: source_check stage: check
script: script:
- npm ci
- npx eslint --ignore-path .gitignore "**/*.js" - npx eslint --ignore-path .gitignore "**/*.js"
backend_build: backend_build:
...@@ -26,11 +34,12 @@ backend_build: ...@@ -26,11 +34,12 @@ backend_build:
- npm run build - npm run build
artifacts: artifacts:
paths: paths:
- . - public/
backend_test: backend_test:
stage: test stage: test
script: script:
- npm ci
- npm test - npm test
deploy: deploy:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment