From 59c4ebc8756dd27d5d2fcbd7410009af417674f5 Mon Sep 17 00:00:00 2001 From: Vitor Date: Mon, 25 Nov 2024 16:41:10 -0300 Subject: [PATCH] chore: git hooks --- .github/workflows/verify.yml | 51 ++++++++++++++++++++++++++++++++++++ .nvmrc | 1 + package.json | 6 ++--- 3 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/verify.yml create mode 100644 .nvmrc diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 00000000..f3fe0e29 --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,51 @@ +name: Verify + +on: + pull_request: + workflow_dispatch: + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - name: Clone Repo + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Install dependencies + shell: bash + run: pnpm install --frozen-lockfile + + - name: Check + run: pnpm check + + types: + name: Types + needs: check + runs-on: ubuntu-latest + steps: + - name: Clone Repo + uses: actions/checkout@v4 + + - name: Setup pnpm + uses: pnpm/action-setup@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + + - name: Install dependencies + shell: bash + run: pnpm install --frozen-lockfile + + - name: Check Types + run: pnpm check:types \ No newline at end of file diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..4486a406 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22.2.0 \ No newline at end of file diff --git a/package.json b/package.json index 393f324e..50544bbe 100644 --- a/package.json +++ b/package.json @@ -23,14 +23,12 @@ }, "packageManager": "pnpm@9.11.0", "engines": { - "node": ">=20" + "node": ">=22" }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" }, "lint-staged": { - "*": [ - "pnpm format --" - ] + "*": ["pnpm format --"] } }