From 9f85cf64cd3a8619686e4106cfad4fec3778e0f8 Mon Sep 17 00:00:00 2001 From: zkldi <20380519+zkldi@users.noreply.github.com> Date: Wed, 1 Jun 2022 15:30:28 +0100 Subject: [PATCH] fix: add a typecheck step after testing. This ensures that what we end up with compiles. It's possible for all of our tests to work, but the app pulls in some benign file that accidentally downs the whole thing This should stop that from ever happening. --- server/.github/workflows/test-build-deploy.yml | 3 +++ server/package.json | 1 + 2 files changed, 4 insertions(+) diff --git a/server/.github/workflows/test-build-deploy.yml b/server/.github/workflows/test-build-deploy.yml index b0833530a..a634fb77e 100644 --- a/server/.github/workflows/test-build-deploy.yml +++ b/server/.github/workflows/test-build-deploy.yml @@ -48,6 +48,9 @@ jobs: - name: Lint Code run: pnpm lint + - name: Typecheck Code + run: pnpm typecheck + - name: Upload Coverage if: always() run: | diff --git a/server/package.json b/server/package.json index 473740a1b..398514066 100644 --- a/server/package.json +++ b/server/package.json @@ -9,6 +9,7 @@ "snap": "TAP_SNAPSHOT=1 tap", "watchtest": "tap --watch", "build": "tsc --project tsconfig.build.json", + "typecheck": "tsc --project tsconfig.build.json --noEmit", "lint": "eslint ./src --ext .ts --fix", "start": "tsc --project tsconfig.build.json && export NODE_PATH=js/ && node js/main.js", "run": "export NODE_PATH=js/ && node js/main.js",