diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..b814832 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Run Tests + +on: + push: + branches: + - master + pull_request: + branches: + - master + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + typecheck: + name: Typecheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: "pnpm" + - name: Install dependencies + run: pnpm install + - name: Run typecheck + run: pnpm run typecheck diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..53d1c14 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v22 diff --git a/package.json b/package.json index d0d590e..03a9d37 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,8 @@ "fast-start": "node dist/main.js configs/config.yaml", "build": "npm run clean && npm run fast-build", "fast-build": "swc src -d dist --strip-leading-paths", - "clean": "rm -rf dist" + "clean": "rm -rf dist", + "typecheck": "tsc --noEmit" }, "repository": { "type": "git",