diff options
| author | Tom Harley | 2018-03-28 19:35:41 +0100 |
|---|---|---|
| committer | Tom Harley | 2018-03-28 19:35:41 +0100 |
| commit | 4e90981c207fecc7e5c6bb86aa9848a8b7f58ace (patch) | |
| tree | 900b0f305642a44e93934391849baf7f86d9b5d1 | |
| parent | Remove PostgreSQL from CI file (diff) | |
| download | medicine-4e90981c207fecc7e5c6bb86aa9848a8b7f58ace.tar.gz medicine-4e90981c207fecc7e5c6bb86aa9848a8b7f58ace.zip | |
Edit CI to lint all files and run all tests
| -rw-r--r-- | .gitlab-ci.yml | 14 | ||||
| -rw-r--r-- | package.json | 6 | ||||
| -rw-r--r-- | tsconfig.json | 3 |
3 files changed, 15 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1041ea8..5d53e9a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,6 +6,7 @@ cache: stages: - build - test + - lint install: stage: build @@ -13,12 +14,17 @@ install: - npm install --global yarn - yarn -mocha: +unit-test: stage: test script: - - yarn test:routes:index + - yarn test:unit -lint: +route-test: stage: test script: - - yarn run _gl-lint + - yarn test:routes + +lint: + stage: lint + script: + - yarn _lint diff --git a/package.json b/package.json index 9f08c51..ef9c3a6 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,9 @@ "docs": "typedoc --out 'docs' --readme 'README.md' --name 'St Andrews Junior Honours 2017/18 - Team BE4' --module commonjs --target ES5 --exclude '*.test.ts' --includeDeclarations --excludeExternals 'src'", "run:postgres": "pg_ctl start", "start": "ts-node src/index.ts", - "lint": "tslint --fix --force -p './tsconfig.json'", - "lint:tests": "tslint --fix --force ./test/**/*", - "_gl-lint": "tslint -p './tsconfig.json'" + "_lint": "tslint -p './tsconfig.json' -c './tslint.json'", + "lint": "yarn _lint --fix --force './src/**/*.ts'", + "lint:tests": "yarn _lint --fix --force './test/**/*.ts'" }, "repository": { "type": "git", diff --git a/tsconfig.json b/tsconfig.json index cde030b..a713583 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,8 @@ }, /* Where to look for .ts files */ "include": [ - "src/**/*.ts" + "src/**/*.ts", + "test/**/*.ts" ], /* Exclude directory */ "exclude": [ |
