Skip to content
Snippets Groups Projects
Commit bd0cde96 authored by Tadeusz Miesiąc's avatar Tadeusz Miesiąc
Browse files

chore(ci test): ci test

parent 35f614bc
No related branches found
No related tags found
2 merge requests!223reset the pin numbers before search results are fetch (so the results will be...,!3Development
default: default:
image: node:16.16.0 image: node:16.16.0
variables:
# enable docker buildkit. Used with `BUILDKIT_INLINE_CACHE=1` below
DOCKER_BUILDKIT: 1
DOCKER_TLS_CERTDIR: '/certs'
IMAGE_TEST: $CI_REGISTRY_IMAGE/test:latest
#IMAGE_CYPRESS: $CI_REGISTRY_IMAGE/cypress:latest
IMAGE_DEPLOY: $CI_REGISTRY_IMAGE/deploy:latest
stages: stages:
- build - test
- misc
- deploy
cache: cache:
paths: paths:
- ~/.cache - ~/.cache
.base: jest:
image: docker:latest stage: test
services:
- docker:dind
before_script: before_script:
- docker --version - apk add --no-cache npm
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY" - npm ci
build:builder:
extends: .base
stage: build
script:
- docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from "$IMAGE_TEST" --target builder -t "$IMAGE_TEST" .
- docker push "$IMAGE_TEST"
build:deployimage:
extends: .base
stage: misc
needs: ['build:builder']
script: script:
- docker build --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from "$IMAGE_DEPLOY" --cache-from "$IMAGE_TEST" --cache-from "$IMAGE_CYPRESS" -t "$IMAGE_DEPLOY" . - npm run test:ci
- docker push "$IMAGE_DEPLOY" only:
- master
- merge_requests
- tags
tags:
- k8s
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
"prepare": "husky install", "prepare": "husky install",
"postinstall": "husky install", "postinstall": "husky install",
"test": "jest --watch --config ./jest.config.mjs", "test": "jest --watch --config ./jest.config.mjs",
"test:ci": "jest --coverage --config ./config/jest.config.js",
"test:coverage": "jest --watchAll --coverage --config ./jest.config.mjs", "test:coverage": "jest --watchAll --coverage --config ./jest.config.mjs",
"test:coveragee": "jest --coverage", "test:coveragee": "jest --coverage",
"coverage": "open ./coverage/lcov-report/index.html" "coverage": "open ./coverage/lcov-report/index.html"
......
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