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 with stage
in 38 seconds
image: node:16-alpine
#
# https://gitlab.com/gitlab-org/gitlab/-/tree/master/lib/gitlab/ci/templates/Nodejs.gitlab-ci.yml
#
image: node:latest
stages:
- build
- test
# - deploy
# Cache modules in between jobs
cache:
key: $CI_COMMIT_REF_SLUG
paths:
- .npm/
install:
stage: .pre
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
before_script:
- npm ci --cache .npm --prefer-offline
build:
stage: build
cache:
key: $CI_COMMIT_REF_SLUG-$CI_PROJECT_DIR
paths:
- node_modules/
policy: pull
test_async:
script:
- npm run build
artifacts:
paths:
- build
run_tests:
stage: test
script: npm run test:unit
\ No newline at end of file
- 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