diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..11e6ccbe --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,44 @@ +name: Lint & Type Check + +on: + push: + branches: ['**'] + pull_request: + branches: ['**'] + +jobs: + lint: + name: Lint & Type Check + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: latest + + - name: Install dependencies + run: bun install + + - name: Run ESLint + run: bun run lint + continue-on-error: false + + - name: TypeScript Check (Frontend) + run: bunx tsc --noEmit + continue-on-error: false + + - name: TypeScript Check (API) + working-directory: ./api + run: bunx tsc --noEmit --module node16 --moduleResolution node16 --target ES2022 --lib ES2022 **/*.ts + continue-on-error: false + + - name: Notify Vercel + if: always() + uses: vercel/repository-dispatch/actions/status@v1 + with: + name: 'Vercel - thrillwiki: lint' + status: ${{ job.status }}