From 5db5efd2ea83ad0ff535ca6997c43d7f1b3d9664 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 28 Mar 2018 15:54:42 +0100 Subject: Remove PostgreSQL from CI file This is mainly a test to see if Postgres is required at all for running tests. --- .gitlab-ci.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cdf3960..1041ea8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,8 @@ image: node:9.1.0 -services: - - postgres:10.0 cache: untracked: true -variables: - POSTGRES_DB: nice_marmot - POSTGRES_USER: admin - POSTGRES_PASSWORD: "" - POSTGRES_HOST: postgres - - stages: - build - test -- cgit v1.2.1 From 4e90981c207fecc7e5c6bb86aa9848a8b7f58ace Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 28 Mar 2018 19:35:41 +0100 Subject: Edit CI to lint all files and run all tests --- .gitlab-ci.yml | 14 ++++++++++---- package.json | 6 +++--- 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": [ -- cgit v1.2.1