Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 35 additions & 3 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Frontend CI

on:
pull_request:
paths:
- "frontend/**"
- ".github/workflows/frontend-ci.yml"
push:
branches:
- main
Expand All @@ -24,40 +21,75 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Detect frontend-relevant pull request changes
if: github.event_name == 'pull_request'
id: changes
working-directory: .
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
changed_files="$(git diff --name-only "$BASE_SHA" "$HEAD_SHA")"
printf '%s\n' "$changed_files"

if printf '%s\n' "$changed_files" | grep -Eq '^(frontend/|\.github/workflows/frontend-ci\.yml$)'; then
echo "run_frontend=true" >> "$GITHUB_OUTPUT"
else
echo "run_frontend=false" >> "$GITHUB_OUTPUT"
fi

- name: No frontend validation needed
if: github.event_name == 'pull_request' && steps.changes.outputs.run_frontend != 'true'
working-directory: .
run: echo "No frontend or Frontend CI workflow files changed; required Frontend CI check passes without running the expensive browser/build suite."

- name: Set up Node
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json

- name: Install dependencies
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm ci

- name: Verify Aisha source and real-browser render
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: node scripts/verify-aisha-source.mjs

- name: Test interview intelligence engine
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm run test:interview

- name: Test structured resume helpers
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm run test:resume

- name: Verify search appearance and sitelink signals
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm run test:seo

- name: Audit every visible click path in real Chrome
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm run test:clicks

- name: Lint
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm run lint

- name: Build
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm run build

- name: Enforce production bundle budgets
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: npm run test:bundle

- name: Verify Aisha production bundle
if: github.event_name != 'pull_request' || steps.changes.outputs.run_frontend == 'true'
run: node scripts/verify-aisha-build.mjs
Loading