From 61e1023b3a416fa1a36597c731539c90ee84aac2 Mon Sep 17 00:00:00 2001 From: HUQIANTAO Date: Mon, 1 Jun 2026 01:51:44 +0800 Subject: [PATCH] ci: add web frontend lint and type check workflow (#2444) Add a dedicated GitHub Actions workflow for the Next.js web frontend that runs on changes to the web/ directory: - ESLint checks via 'npm run lint' - TypeScript type checking via 'tsc --noEmit' - Runs on push to main and PRs targeting main - Uses npm cache for faster dependency installation Co-authored-by: Hu Qiantao --- .github/workflows/web.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/web.yml diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml new file mode 100644 index 00000000..d9d22192 --- /dev/null +++ b/.github/workflows/web.yml @@ -0,0 +1,35 @@ +name: Web Frontend + +on: + push: + branches: [master, main] + paths: + - 'web/**' + pull_request: + branches: [master, main] + paths: + - 'web/**' + +permissions: + contents: read + +jobs: + lint: + name: Lint & Type Check + runs-on: ubuntu-latest + defaults: + run: + working-directory: web + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'npm' + cache-dependency-path: web/package-lock.json + - name: Install dependencies + run: npm ci + - name: Run ESLint + run: npm run lint + - name: TypeScript type check + run: npx tsc --noEmit