Merge branch 'dev' of ssh://gitlab.prod.dtstack.cn:10022/dt-insight-front/infrastructure/dt-sql-parser into dev
This commit is contained in:
commit
996d875167
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,10 +15,10 @@
|
|||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"antlr4": "node build/antlr4.js",
|
"antlr4": "node build/antlr4.js",
|
||||||
"build": "npm test && rm -rf dist && tsc",
|
"build": "rm -rf dist && tsc",
|
||||||
"eslint": "eslint ./src/**/*.ts",
|
"eslint": "eslint ./src/**/*.ts",
|
||||||
"check-types": "tsc --skipLibCheck",
|
"check-types": "tsc --skipLibCheck",
|
||||||
"test": "jest --coverage"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
"author": "dt-insight-front",
|
"author": "dt-insight-front",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
|
@ -10,6 +10,7 @@ describe('PLSQL Listener Tests', () => {
|
|||||||
test('Listener enterTableName', async () => {
|
test('Listener enterTableName', async () => {
|
||||||
let result = '';
|
let result = '';
|
||||||
class MyListener extends PlSqlParserListener {
|
class MyListener extends PlSqlParserListener {
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
enterTable_ref_list(ctx): void {
|
enterTable_ref_list(ctx): void {
|
||||||
result = ctx.getText().toLowerCase();
|
result = ctx.getText().toLowerCase();
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ describe('PLSQL Visitor Tests', () => {
|
|||||||
test('Visitor visitTable_ref_list', () => {
|
test('Visitor visitTable_ref_list', () => {
|
||||||
let result = '';
|
let result = '';
|
||||||
class MyVisitor extends PlSqlParserVisitor {
|
class MyVisitor extends PlSqlParserVisitor {
|
||||||
|
// eslint-disable-next-line camelcase
|
||||||
visitTable_ref_list(ctx): void {
|
visitTable_ref_list(ctx): void {
|
||||||
result = ctx.getText().toLowerCase();
|
result = ctx.getText().toLowerCase();
|
||||||
super.visitTable_ref_list(ctx);
|
super.visitTable_ref_list(ctx);
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"./src/**/*"
|
"./src/**/*"
|
||||||
],
|
],
|
||||||
"exclude": [
|
|
||||||
"./src/peg/*",
|
|
||||||
"./src/jison/*"
|
|
||||||
],
|
|
||||||
"typeAcquisition": {
|
"typeAcquisition": {
|
||||||
"include": [
|
"include": [
|
||||||
"jest"
|
"jest"
|
||||||
|
Loading…
Reference in New Issue
Block a user