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
This commit is contained in:
James Cox
2026-04-22 17:26:41 -04:00
committed by Zach Yale
parent dc2c1ec395
commit dcd264cf6b
4 changed files with 31 additions and 19 deletions
+16 -13
View File
@@ -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"
echo "OK: All quality thresholds passed"