From 5fa6a671887c6aaa101e7545a5d09efd7241d49c Mon Sep 17 00:00:00 2001 From: Reed von Redwitz Date: Mon, 31 Jul 2023 11:49:27 +0200 Subject: [PATCH] chore(ci): type check entire project in ci (#1538) --- .github/workflows/ci.yml | 15 +++------------ deno.json | 3 ++- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2105f57f..ab7ffd39 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,9 @@ jobs: if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'canary' uses: crate-ci/typos@master + - name: Type check project + run: deno task check:types + - name: Cache dependencies if: startsWith(matrix.os, 'ubuntu') && matrix.deno == 'v1.x' run: deno cache --config=www/deno.json src/dev/deps.ts src/server/deps.ts www/main.ts @@ -80,10 +83,6 @@ jobs: - name: Type check init script run: deno check --remote init.ts - - name: Type check website - run: deno check main.ts dev.ts - working-directory: www/ - - name: Test website run: deno test -A working-directory: www/ @@ -91,11 +90,3 @@ jobs: - name: Type check demo run: deno check --remote main.ts dev.ts working-directory: demo - - - name: Type check tests/fixture - run: deno check main.ts dev.ts - working-directory: tests/fixture/ - - - name: Type check tests/fixture_error - run: deno check main.ts dev.ts - working-directory: tests/fixture_error/ diff --git a/deno.json b/deno.json index 6ca5be78..ef172c47 100644 --- a/deno.json +++ b/deno.json @@ -4,7 +4,8 @@ "test": "deno test -A --parallel && deno check --config=www/deno.json www/main.ts www/dev.ts && deno check init.ts", "fixture": "deno run -A --watch=static/,routes/ tests/fixture/dev.ts", "www": "deno task --cwd=www start", - "screenshot": "deno run -A www/utils/screenshot.ts" + "screenshot": "deno run -A www/utils/screenshot.ts", + "check:types": "deno check **/*.ts && deno check **/*.tsx" }, "importMap": "./.vscode/import_map.json", "compilerOptions": {