Skip to content
Snippets Groups Projects

Setup CI

2 files
+ 38
1
Compare changes
  • Side-by-side
  • Inline

Files

.gitlab-ci.yml 0 → 100644
+ 49
0
 
image: node:14-alpine
 
stages:
 
- test
 
- build
 
 
# Prevent detached merge request pipelines
 
# https://docs.gitlab.com/ee/ci/merge_request_pipelines/
 
# Those do not run the environment on_stop jobs when MRs are closed/merged
 
# or when branches get deleted, unlike branch pipelines.
 
workflow:
 
rules:
 
- if: '$CI_MERGE_REQUEST_ID'
 
when: never
 
- when: always
 
 
before_script:
 
- npm ci
 
 
lint:
 
stage: test
 
 
before_script:
 
- apk add --update python3 bash git
 
- pip3 install pre-commit
 
 
script:
 
- pre-commit run -a
 
 
audit:
 
stage: test
 
script:
 
- npm audit --parseable
 
allow_failure: true
 
 
.build:
 
stage: build
 
# Ignore frontend-audit to speed up CI builds
 
needs:
 
- lint
 
artifacts:
 
paths:
 
- dist
 
expire_in: 2 weeks
 
 
build-library:
 
extends: .build
 
 
script:
 
- npm run build
Loading