From 3e12fcc7c8d007e000c9c7b69ed14461a7eb03af Mon Sep 17 00:00:00 2001 From: Dor Shtaif Date: Fri, 31 Jan 2025 11:52:16 +0200 Subject: [PATCH] add tests type check workflow for CI --- .github/workflows/ci-tests-type-check.yaml | 18 ++++++++++++++++++ package.json | 1 + spec/tsconfig.json | 2 +- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci-tests-type-check.yaml diff --git a/.github/workflows/ci-tests-type-check.yaml b/.github/workflows/ci-tests-type-check.yaml new file mode 100644 index 0000000..1ac87fb --- /dev/null +++ b/.github/workflows/ci-tests-type-check.yaml @@ -0,0 +1,18 @@ +name: CI - tests type check + +on: + pull_request: + branches: [master] + +jobs: + run_tests_ts_type_check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - uses: ./.github/actions/ci-common-setup + + - name: TypeScript test build + run: pnpm run test-typings-check diff --git a/package.json b/package.json index 0c65ead..56b4b3d 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,7 @@ "scripts": { "test": "vitest --run --config ./spec/vitest.config.ts", "test:dev": "vitest --watch --config ./spec/vitest.config.ts", + "test-typings-check": "tsc --noEmit -p ./spec/tsconfig.json", "build": "rm -rf ./dist && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && node ./scripts/set-module-type-in-dist-builds.mjs", "build-check": "tsc --noEmit -p ./tsconfig.json", "prepublishOnly": "npm run build" diff --git a/spec/tsconfig.json b/spec/tsconfig.json index 367defa..fa5fbef 100644 --- a/spec/tsconfig.json +++ b/spec/tsconfig.json @@ -1,6 +1,6 @@ { "$schema": "https://json.schemastore.org/tsconfig", - "include": ["./**/*.ts", "./**/*.tsx"], "extends": "../tsconfig.json", + "include": ["./**/*.ts", "./**/*.tsx", "./**/*.js", "./**/*.mjs", "./**/*.jsx"], "compilerOptions": {} }