ci: E2E jobs run on backend-only PRs again

Merged
HA
18h ago
+7-2

Summary

Small bug found while checking #394's CI: on a PR that skips Frontend Unit Tests, CI skips both E2E jobs too, so every backend-only PR since #368 merged without E2E (#391, #392, #394, #395). A break showed up only on main. Of the last 40 PR runs that ran Backend Unit Tests, all 14 that skipped Frontend Unit Tests skipped Backend E2E as well, for example #394's run with backend = true.

Changes

Both E2E jobs need build-images, and build-images needs frontend-unit. Without a status function in the if, a skip "applies to all jobs in the dependency chain from the point of failure or skip onwards", even though build-images itself ran. The E2E conditions now start with !cancelled() && needs.build-images.result == 'success', the way build-images already handles its skipped needs. cicd.md says why.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/CD or tooling changes

Test Plan

  • Backend unit tests pass (cd backend && uv run pytest tests/unit)
  • Frontend unit tests pass (cd frontend && npm run test)
  • Backend E2E tests pass (docker compose exec -T backend sh -c 'uv sync --group test --no-dev --frozen --no-install-project --no-build && pytest tests/e2e')
  • Frontend E2E tests pass (cd frontend && npm run test:e2e)
  • API spec and client regenerated if routes or schemas changed (./deploy.sh openapi, then ./deploy.sh types), never edited by hand
  • Manual testing performed

Validation: actionlint passes. This PR changes ci.yml, so every filter is on and its own run can't show the skip; the next backend-only PR will.

Checklist

  • My code follows the project's style guidelines
  • I have run pre-commit run --all-files and all checks pass
  • I have added tests that prove my fix/feature works
  • I have updated documentation if needed
  • My changes don't introduce new warnings

Summary by cubic

Restores E2E coverage on backend-only PRs. Skipping the frontend unit job previously cascaded down the needs chain and skipped both E2E jobs, even though build-images ran fine.

Both E2E jobs now gate on !cancelled() && needs.build-images.result == 'success' in their own if conditions, matching how build-images already handles skipped needs. cicd.md now documents why the status function is required.