diff --git a/.github/workflows/pr-checks.yml b/.github/workflows/pr-checks.yml new file mode 100644 index 0000000..338ae6a --- /dev/null +++ b/.github/workflows/pr-checks.yml @@ -0,0 +1,33 @@ +name: PR Checks + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + lint-build-test: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Run lint + run: npm run lint + + - name: Run build + run: npm run build + + - name: Run tests + run: npm test diff --git a/package.json b/package.json index a261161..9399c83 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ ], "scripts": { "build": "tsc", + "lint": "tsc --noEmit", "start": "node dist/index.js", "dev": "ts-node src/index.ts", "test": "jest",