Skip to content
Snippets Groups Projects
Commit d1086735 authored by Erik Borgeteien Hansen's avatar Erik Borgeteien Hansen
Browse files

test

parent 8238811b
No related branches found
No related tags found
1 merge request!31Cicd
Pipeline #176642 passed
image: node:16-alpine #
# https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/Nodejs.gitlab-ci.yml
#
image: node:latest
stages: # Cache modules in between jobs
- build cache:
- test key: $CI_COMMIT_REF_SLUG
# - deploy paths:
- .npm/
install: before_script:
stage: .pre - npm ci --cache .npm --prefer-offline
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
# before_script: #Runs before script; in case we need .envs later
# - cp .env.gitlab-testing .env
script:
- npm ci
only:
changes:
- package-lock.json
build: test_async:
stage: build
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
policy: pull
script: script:
- npm run build - npm run test:unit
artifacts: \ No newline at end of file
paths:
- build
run_tests:
stage: test
script: npm run test:unit
\ No newline at end of file
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