From 3a55f477cc2b95baeabb7ed6b84500d147c06241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr> Date: Wed, 13 Nov 2019 10:38:16 +0100 Subject: [PATCH] =?UTF-8?q?Compile=20le=20code=20Typescript=20g=C3=A9n?= =?UTF-8?q?=C3=A9r=C3=A9=20pour=20le=20tester.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 24 ++++++++++++++++++++++++ package.json | 3 ++- tsconfig.ci.json | 16 ++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 tsconfig.ci.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 063047d..c745934 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,9 +2,18 @@ include: - project: pole-is/tools/ci-config ref: "1.9.0" file: /php-package-ci.yml + - project: pole-is/tools/ci-config + ref: "1.9.0" + file: /nodejs-ci.yml + +stages: + - vendor + - test + - test-generated variables: PHP_VERSION: "7.1" + NODEJS_TEST_BROWSER_PACKAGES: "" test:console: extends: .php-test @@ -18,3 +27,18 @@ test:generate: test:phpcpd: allow_failure: true + +npm:lint: + allow_failure: true + +npm:test: + allow_failure: true + +test:tsc: + stage: test-generated + extends: .nodejs + dependencies: + - node_modules + - test:generate + script: + - npm run-script test:compile-generated diff --git a/package.json b/package.json index 7466024..5af126b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "dist/index.js", "directories": {}, "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "test:compile-generated": "tsc --project tsconfig.ci.json --pretty --noEmit" }, "repository": { "type": "git", diff --git a/tsconfig.ci.json b/tsconfig.ci.json new file mode 100644 index 0000000..f228d50 --- /dev/null +++ b/tsconfig.ci.json @@ -0,0 +1,16 @@ +{ + "extends": "./node_modules/irstea-typescript-config/tsconfig.json", + "compileOnSave": false, + "compilerOptions": { + "outDir": "out-tsc/test", + "target": "es2015", + "declaration": true, + "sourceMap": true, + "inlineSources": false, + "experimentalDecorators": true, + "typeRoots": ["node_modules/@types"], + "moduleResolution": "node", + "lib": ["dom","es2018"] + }, + "include": ["output/**/*.ts"] +} -- GitLab