From 452dc9f3e6d53faba1c313b34d412d82a2eed254 Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Sat, 9 Aug 2025 13:28:38 +0800 Subject: [PATCH] chore: cache nextjs build for CI (#1771) --- .github/workflows/pull-request.yml | 11 +++++++++-- .github/workflows/release.yml | 2 +- .../app/reader/components/settings/LayoutPanel.tsx | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 960f46ec..82540345 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -45,7 +45,7 @@ jobs: - name: setup pnpm uses: pnpm/action-setup@v4 with: - version: 9.15.1 + version: 10.14.0 - name: setup node uses: actions/setup-node@v4 @@ -53,6 +53,13 @@ jobs: node-version: 22 cache: pnpm + - name: cache Next.js build + uses: actions/cache@v4 + with: + path: apps/readest-app/.next/cache + key: nextjs-${{ runner.os }}-${{ hashFiles('apps/readest-app/package.json', 'pnpm-lock.yaml') }} + restore-keys: nextjs-${{ runner.os }}- + - name: install Dependencies working-directory: apps/readest-app run: | @@ -61,7 +68,7 @@ jobs: - name: run tests working-directory: apps/readest-app run: | - pnpm test -- --watchAll=false + pnpm test -- --watch=false - name: build the web App if: matrix.config.platform == 'web' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c89e0ab..f2ab10f6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,7 +99,7 @@ jobs: - name: setup pnpm uses: pnpm/action-setup@v4 with: - version: 9.14.4 + version: 10.14.0 - name: setup node uses: actions/setup-node@v4 diff --git a/apps/readest-app/src/app/reader/components/settings/LayoutPanel.tsx b/apps/readest-app/src/app/reader/components/settings/LayoutPanel.tsx index ff0b3d78..fc364dc3 100644 --- a/apps/readest-app/src/app/reader/components/settings/LayoutPanel.tsx +++ b/apps/readest-app/src/app/reader/components/settings/LayoutPanel.tsx @@ -326,6 +326,7 @@ const LayoutPanel: React.FC = ({ bookKey, onRegisterRese useEffect(() => { saveViewSettings(envConfig, bookKey, 'progressStyle', progressStyle, false, false); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [progressStyle]); useEffect(() => {