From dcd264cf6ba34d2acc2a10bc64c1a98083dabd53 Mon Sep 17 00:00:00 2001 From: James Cox Date: Wed, 25 Mar 2026 20:05:26 -0500 Subject: [PATCH] fix(ci): align github actions with yarn 4 frontend tooling - Test suite workflow: - stop relying on setup-node's Yarn 1 cache integration for the frontend job - enable Corepack explicitly before the frontend install and test steps so the reusable test suite runs with Yarn 4 - Frontend threshold workflow: - switch the job from the old booklore-ui/npm path to frontend/Corepack/Yarn commands - keep the existing threshold logic, but run install, typecheck, build, and ESLint through the current frontend command surface - Release workflows: - enable Corepack before installing Yarn-based release tooling in the stable and preview release jobs - remove the setup-node Yarn cache settings that fail against packageManager-pinned Yarn 4 projects - Validation: - run just ui install-ci - verify the threshold workflow commands produce lint-results.json and build-output.log locally - run just ui deps and confirm just ui check now reaches the existing ESLint backlog instead of failing on Yarn 1 CI setup --- .github/workflows/angular-lint-threshold.yml | 29 +++++++++++--------- .github/workflows/release-main.yml | 7 +++-- .github/workflows/release-preview.yml | 7 +++-- .github/workflows/test-suite.yml | 7 +++-- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/angular-lint-threshold.yml b/.github/workflows/angular-lint-threshold.yml index 035a23a3e..1874c3d4e 100644 --- a/.github/workflows/angular-lint-threshold.yml +++ b/.github/workflows/angular-lint-threshold.yml @@ -32,22 +32,25 @@ jobs: uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 with: node-version: '24' - cache: 'npm' - cache-dependency-path: booklore-ui/package-lock.json + + - name: Enable Corepack + run: | + corepack enable + corepack yarn --version - name: Install Frontend Dependencies - working-directory: ./booklore-ui - run: npm ci + working-directory: ./frontend + run: corepack yarn install --immutable - name: Typecheck Frontend - working-directory: ./booklore-ui - run: npx tsc --noEmit -p tsconfig.app.json + working-directory: ./frontend + run: corepack yarn typecheck - name: Run Frontend Build - working-directory: ./booklore-ui + working-directory: ./frontend run: | set +e - npx ng build --configuration production --progress=false 2>&1 | tee build-output.log + CI=1 NG_CLI_ANALYTICS=false corepack yarn build:prod 2>&1 | tee build-output.log BUILD_EXIT_CODE=${PIPESTATUS[0]} set -e @@ -57,7 +60,7 @@ jobs: fi - name: Count Build Warnings - working-directory: ./booklore-ui + working-directory: ./frontend run: | if [ ! -f build-output.log ]; then echo "ERROR: build-output.log was not generated by ng build" @@ -71,13 +74,13 @@ jobs: echo "BUILD_WARNING_COUNT=${BUILD_WARNING_COUNT}" >> "$GITHUB_ENV" - name: Run Frontend Linter - working-directory: ./booklore-ui + working-directory: ./frontend run: | # Lint output is written to JSON for threshold evaluation. - npx ng lint --format json --output-file lint-results.json || true + corepack yarn lint:eslint --format json --output-file lint-results.json || true - name: Count Lint Warnings - working-directory: ./booklore-ui + working-directory: ./frontend run: | if [ ! -f lint-results.json ]; then echo "ERROR: lint-results.json was not generated by ng lint" @@ -129,4 +132,4 @@ jobs: exit 1 fi - echo "OK: All quality thresholds passed" \ No newline at end of file + echo "OK: All quality thresholds passed" diff --git a/.github/workflows/release-main.yml b/.github/workflows/release-main.yml index 7f19fcd24..fccb0ff9a 100644 --- a/.github/workflows/release-main.yml +++ b/.github/workflows/release-main.yml @@ -61,8 +61,11 @@ jobs: uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 with: node-version: '24' - cache: 'yarn' - cache-dependency-path: tools/release/yarn.lock + + - name: Enable Corepack + run: | + corepack enable + corepack yarn --version - name: Install Release Tooling Dependencies run: just release install diff --git a/.github/workflows/release-preview.yml b/.github/workflows/release-preview.yml index 7b6a7d3c5..046c34f98 100644 --- a/.github/workflows/release-preview.yml +++ b/.github/workflows/release-preview.yml @@ -58,8 +58,11 @@ jobs: uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 with: node-version: '24' - cache: 'yarn' - cache-dependency-path: tools/release/yarn.lock + + - name: Enable Corepack + run: | + corepack enable + corepack yarn --version - name: Install Release Tooling Dependencies run: just release install diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index 8f441328a..de0ff9885 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -119,8 +119,11 @@ jobs: uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6 with: node-version: '24' - cache: 'yarn' - cache-dependency-path: frontend/yarn.lock + + - name: Enable Corepack + run: | + corepack enable + corepack yarn --version - name: Install Frontend Dependencies run: just ui install-ci