diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml new file mode 100644 index 00000000..5b834f8f --- /dev/null +++ b/.github/workflows/test-integration.yml @@ -0,0 +1,33 @@ +name: TypeScript Type Check + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +jobs: + type-check: + name: TypeScript Type Check + runs-on: ubuntu-latest + timeout-minutes: 5 + + steps: + - name: Checkout repository + uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4 + + - name: Setup Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: '22' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run TypeScript type check + run: npm run type-check diff --git a/package.json b/package.json index bbda1017..0ba57ce8 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "scripts": { "build": "tsc", "dev": "tsc --watch", + "type-check": "tsc --noEmit -p tsconfig.check.json", "test": "jest", "test:unit": "jest --config jest.config.js", "test:integration": "jest --config tests/setup/jest.integration.config.js", diff --git a/tsconfig.check.json b/tsconfig.check.json new file mode 100644 index 00000000..aa984b7f --- /dev/null +++ b/tsconfig.check.json @@ -0,0 +1,15 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "noEmit": true + }, + "include": [ + "src/**/*.ts", + "tests/**/*.ts" + ], + "exclude": [ + "node_modules", + "dist" + ] +}