From e0ba4e7372dbf35e6594332b106b25ba8cf3f377 Mon Sep 17 00:00:00 2001 From: tharunreddy08 Date: Sun, 27 Sep 2026 11:06:05 +0530 Subject: [PATCH 1/2] ci: run frontend lint and build on pull requests --- .github/workflows/frontend-ci.yml | 40 +++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/frontend-ci.yml diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml new file mode 100644 index 0000000..33e3bb8 --- /dev/null +++ b/.github/workflows/frontend-ci.yml @@ -0,0 +1,40 @@ +name: Frontend CI + +on: + pull_request: + branches: [main] + paths: + - "src/**" + - "public/**" + - "index.html" + - "package.json" + - "package-lock.json" + - "vite.config.js" + - "eslint.config.js" + - ".github/workflows/frontend-ci.yml" + push: + branches: [main] + +jobs: + lint-and-build: + name: Lint & Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Run lint + run: npm run lint + + - name: Build + run: npm run build From 129cb5c7e27acc0a3ca8a95704af14b1cd614d6c Mon Sep 17 00:00:00 2001 From: tharunreddy08 Date: Mon, 16 Nov 2026 14:01:49 +0530 Subject: [PATCH 2/2] ci: separate frontend lint and build checks --- .github/workflows/ci.yml | 26 ++++++++++++++++++++ .github/workflows/frontend-ci.yml | 40 ------------------------------- 2 files changed, 26 insertions(+), 40 deletions(-) delete mode 100644 .github/workflows/frontend-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d2c1086..13a874b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ + name: CI on: @@ -38,6 +39,7 @@ jobs: frontend-tests: runs-on: ubuntu-latest timeout-minutes: 10 + steps: - name: Get the code uses: actions/checkout@v6 @@ -60,6 +62,7 @@ jobs: frontend-build: runs-on: ubuntu-latest timeout-minutes: 10 + steps: - name: Get the code uses: actions/checkout@v6 @@ -78,3 +81,26 @@ jobs: - name: Build frontend run: npm run build + + frontend-lint: + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - name: Get the code + uses: actions/checkout@v6 + with: + persist-credentials: false + + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: '22' + cache: npm + cache-dependency-path: package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Lint frontend + run: npx eslint src diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml deleted file mode 100644 index 33e3bb8..0000000 --- a/.github/workflows/frontend-ci.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Frontend CI - -on: - pull_request: - branches: [main] - paths: - - "src/**" - - "public/**" - - "index.html" - - "package.json" - - "package-lock.json" - - "vite.config.js" - - "eslint.config.js" - - ".github/workflows/frontend-ci.yml" - push: - branches: [main] - -jobs: - lint-and-build: - name: Lint & Build - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: "npm" - - - name: Install dependencies - run: npm ci - - - name: Run lint - run: npm run lint - - - name: Build - run: npm run build