From 088938746491086116d9ad725e36295f6725fda7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr> Date: Wed, 17 Feb 2021 14:27:34 +0100 Subject: [PATCH] =?UTF-8?q?dev:=20met=20en=20place=20un=20pseudo-package?= =?UTF-8?q?=20pour=20tester=20la=20compilation=20des=20mod=C3=A8les=20g?= =?UTF-8?q?=C3=A9n=C3=A9r=C3=A9s.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 2 +- package.json | 4 ++-- tests/Fixtures/.gitignore | 4 ++++ tests/Fixtures/package.json | 6 ++++++ tests/Fixtures/tsconfig.json | 14 ++++++++++++++ tsconfig.ci.json | 8 -------- 6 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 tests/Fixtures/.gitignore create mode 100644 tests/Fixtures/package.json create mode 100644 tests/Fixtures/tsconfig.json delete mode 100644 tsconfig.ci.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 194dcc0..2bb3df5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ test:generate: paths: - output/ -test:tsc: +test:compile-generated: stage: test-generated extends: .nodejs needs: diff --git a/package.json b/package.json index 32ac472..6659d14 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ "build": "tsc -p tsconfig.lib.json", "lint": "eslint --fix '{src,tests}/**/*.{js,ts}' --quiet --fix", "test": "jest", - "test:compile-generated": "tsc --project tsconfig.ci.json --pretty --noEmit", - "test:lint": "eslint '{src,tests}/**/*.{js,ts}'" + "test:lint": "eslint '{src,tests}/**/*.{js,ts}'", + "test:compile-generated": "cd tests/Fixtures && npm install && tsc --pretty" }, "repository": { "type": "git", diff --git a/tests/Fixtures/.gitignore b/tests/Fixtures/.gitignore new file mode 100644 index 0000000..d7ff83d --- /dev/null +++ b/tests/Fixtures/.gitignore @@ -0,0 +1,4 @@ +/package-lock.json +/node_modules +/models +/var diff --git a/tests/Fixtures/package.json b/tests/Fixtures/package.json new file mode 100644 index 0000000..1e5be86 --- /dev/null +++ b/tests/Fixtures/package.json @@ -0,0 +1,6 @@ +{ + "name": "ng-model-generator-test", + "dependencies": { + "irstea-ng-model": "file:../.." + } +} diff --git a/tests/Fixtures/tsconfig.json b/tests/Fixtures/tsconfig.json new file mode 100644 index 0000000..eb934ea --- /dev/null +++ b/tests/Fixtures/tsconfig.json @@ -0,0 +1,14 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + + "extends": "@tsconfig/node10/tsconfig.json", + + "compileOnSave": false, + "compilerOptions": { + "noEmit": true, + "rootDir": "./models" + }, + + "include": ["models/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/tsconfig.ci.json b/tsconfig.ci.json deleted file mode 100644 index 264fd47..0000000 --- a/tsconfig.ci.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "$schema": "https://json.schemastore.org/tsconfig", - - "extends": "./tsconfig.json", - - "include": ["src/ts/**/*.ts", "output/**/*.ts"], - "exclude": ["node_modules", "**/*.spec.ts"] -} -- GitLab