diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..3bc841f --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches-ignore: + - prod + +jobs: + test: + name: Lint & Test + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: latest + + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: pnpm + + - run: pnpm install + + - name: Lint + run: pnpm lint diff --git a/package.json b/package.json index 30ace10..cdbdd52 100644 --- a/package.json +++ b/package.json @@ -4,12 +4,13 @@ "description": "", "type": "module", "scripts": { + "build": "tsx esbuild.ts", "coverage": "vitest run --coverage", "generateApi": "tsx generate-api.js && prettier src/__generated__ --write", + "lint": "prettier . --check", "start": "tsx index.ts", "test": "vitest", - "type-check": "tsc --noEmit", - "build": "tsx esbuild.ts" + "typecheck": "tsc --noEmit" }, "author": "", "license": "ISC",