-
Piotr Gawron authoredPiotr Gawron authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
.gitlab-ci.yml 1.41 KiB
stages:
- lint
- prettier
- test
- deploy
cache:
paths:
- ~/.cache
lint:commit:
image: node:16.16.0-alpine
stage: lint
allow_failure: true
before_script:
- apk add --no-cache npm git
- npm ci
script:
- echo "${CI_COMMIT_MESSAGE}" | npx commitlint
linter:
image: node:16.16.0-alpine
stage: lint
before_script:
- apk add --no-cache npm git
- npm ci
script:
- npm run lint:ts
only:
- development
- merge_requests
- tags
prettier:
image: node:16.16.0-alpine
stage: prettier
before_script:
- apk add --no-cache npm git
- npm ci
script:
- npm run prettier:ci
only:
- development
- merge_requests
- tags
jest:
image: node:16.16.0-alpine
stage: test
coverage: /All files[^|]*\|[^|]*\s+([\d\.]+)/
before_script:
- apk add --no-cache npm git
- npm ci
script:
- npm run test:ci
only:
- development
- merge_requests
- tags
artifacts:
when: always
reports:
junit:
- junit.xml
coverage_report:
coverage_format: cobertura
path: coverage/cobertura-coverage.xml
deploy_staging:
image: node:16.16.0
stage: deploy