ci: integrate with gitlab-ci
This commit is contained in:
parent
a0f5b00ce8
commit
343ce60a09
45
.gitlab-ci.yml
Normal file
45
.gitlab-ci.yml
Normal file
@ -0,0 +1,45 @@
|
||||
# Read more: https://docs.gitlab.com/12.7/ee/ci/yaml/README.html
|
||||
cache:
|
||||
paths:
|
||||
- .yarn
|
||||
- node_modules/
|
||||
|
||||
before_script:
|
||||
- yarn install --cache-folder .yarn
|
||||
|
||||
stages:
|
||||
- static-checking
|
||||
- type-checking
|
||||
- test
|
||||
- build
|
||||
|
||||
static-checking:
|
||||
stage: static-checking
|
||||
script:
|
||||
- yarn eslint
|
||||
only:
|
||||
- merge_requests
|
||||
- dev
|
||||
|
||||
type-checking:
|
||||
stage: type-checking
|
||||
script:
|
||||
- yarn check-types
|
||||
only:
|
||||
- merge_requests
|
||||
- dev
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- yarn test
|
||||
only:
|
||||
- merge_requests
|
||||
- dev
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- yarn build
|
||||
only:
|
||||
- dev
|
@ -15,7 +15,7 @@
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"antlr4": "node build/antlr4.js",
|
||||
"build": "npm test && rm -rf dist && tsc",
|
||||
"build": "rm -rf dist && tsc",
|
||||
"eslint": "eslint ./src/**/*.ts",
|
||||
"check-types": "tsc --skipLibCheck",
|
||||
"test": "jest --coverage"
|
||||
|
Loading…
Reference in New Issue
Block a user