diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..21ddcbe --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: CI Checks + +on: + push: + branches: + - 'main' + pull_request: + branches: + - 'main' + +jobs: + checks: + name: Run Checks & Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + + - name: Setup node + uses: actions/setup-node@v3 + with: + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Run Linter + run: pnpm run lint + + - name: Check Prettier + run: pnpm run prettier + + - name: TypeScript Type Check + run: pnpm run type-check + + - name: Run test suite + run: pnpm test + + - name: Build + run: pnpm run build diff --git a/.prettierignore b/.prettierignore index 8f322f0..261c842 100644 --- a/.prettierignore +++ b/.prettierignore @@ -33,3 +33,6 @@ yarn-error.log* # typescript *.tsbuildinfo next-env.d.ts + +# pnpm +pnpm-lock.yaml diff --git a/package.json b/package.json index 0c3b856..6093c65 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ "build": "next build", "start": "next start", "lint": "next lint", + "prettier": "pnpm exec prettier . --check", + "prettier:fix": "pnpm exec prettier . --write", + "type-check": "tsc --noEmit", "test": "jest", "test:watch": "jest --watchAll" },