From c79d7421c19d66762325ff439fe0cbf2b7768f83 Mon Sep 17 00:00:00 2001 From: Muhammad Ali Date: Sun, 7 Jun 2026 02:54:55 +0500 Subject: [PATCH] ci: add GitHub Actions workflow and ESLint config --- .eslintrc.json | 3 +++ .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .eslintrc.json create mode 100644 .github/workflows/ci.yml diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 000000000..bffb357a7 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "next/core-web-vitals" +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..e1ab71996 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read # security best practice — limits what the token can do + +jobs: + build: + name: Install, lint & build + runs-on: ubuntu-latest + timeout-minutes: 15 # kill job if it hangs (saves free minutes) + + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + submodules: recursive # REQUIRED — repo has 3 git submodules + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 # upgraded: Next 15 + React 19 need Node 20+ + cache: 'npm' # caches node_modules between runs + + - name: Install dependencies and build packages + run: npm run setup # runs: git submodule update + npm install + build:packages + + - name: Lint + run: npm run lint + + - name: Build + run: npm run build