From e22d963d21ae416125c354bdd321908aa25da776 Mon Sep 17 00:00:00 2001 From: Luca Zani Date: Mon, 6 Nov 2023 18:20:26 +0100 Subject: [PATCH] ci: added typecheck workflow --- .github/workflows/typecheck.yml | 30 ++++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/typecheck.yml diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 0000000..2d735fa --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,30 @@ +name: Typecheck +on: + workflow_dispatch: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + paths: + - "**.ts" + - "**.tsx" + - "**.js" + - "**.json" + - "**.lock" + +jobs: + typecheck: + name: Typecheck + runs-on: ubuntu-latest + if: ${{ !github.event.pull_request.draft }} + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Yarn install + uses: ./.github/actions/yarn-install + + - name: Typecheck + run: yarn typecheck diff --git a/package.json b/package.json index a9a4ec8..9c45bdc 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-path .gitignore", "eas-build-pre-install": "echo $GOOGLE_SERVICES_ANDROID_BASE64 | base64 --decode > ./google-services.json", "prepare": "husky install", - "start-be": "cd ../api-ping-4-gitlab && pnpm dev" + "start-be": "cd ../api-ping-4-gitlab && pnpm dev", + "typecheck": "tsc --noEmit" }, "dependencies": { "@expo-google-fonts/source-sans-pro": "^0.2.2",