From 568b0327d5356ed3e37dc719529b14f33d994830 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 5 May 2024 17:06:41 +0200 Subject: [PATCH] chore: add github workflow for typecheck and lint --- .github/workflows/global.yml | 35 +++++++++++++++++++++++++++++++++++ package.json | 1 + pnpm-lock.yaml | 3 +++ 3 files changed, 39 insertions(+) create mode 100644 .github/workflows/global.yml diff --git a/.github/workflows/global.yml b/.github/workflows/global.yml new file mode 100644 index 0000000..ec55d94 --- /dev/null +++ b/.github/workflows/global.yml @@ -0,0 +1,35 @@ +name: 🔨 + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + tsc_and_lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + + - name: Use pnpm + uses: pnpm/action-setup@v2.4.0 + with: + package_json_file: package.json + + - name: Install + run: pnpm install --frozen-lockfile + + - name: Typecheck + run: pnpm typecheck + + - name: Lint + run: pnpm lint diff --git a/package.json b/package.json index 7435fb9..51aee7d 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@antfu/eslint-config": "^2.16.1", "@types/node": "^20.12.8", "eslint": "^9.2.0", + "typescript": "^5.4.5", "unbuild": "^2.0.0", "vitest": "^1.6.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2c3424..833cbd3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,6 +21,9 @@ importers: eslint: specifier: ^9.2.0 version: 9.2.0 + typescript: + specifier: ^5.4.5 + version: 5.4.5 unbuild: specifier: ^2.0.0 version: 2.0.0(typescript@5.4.5)