Skip to content

Add API smoke tests and GitHub Actions CI (web build verification)#19

Merged
astromen-orbiter merged 2 commits intomainfrom
codex/design-test-cases-for-github-actions
Mar 3, 2026
Merged

Add API smoke tests and GitHub Actions CI (web build verification)#19
astromen-orbiter merged 2 commits intomainfrom
codex/design-test-cases-for-github-actions

Conversation

@AstroMen
Copy link
Copy Markdown
Owner

@AstroMen AstroMen commented Mar 3, 2026

Motivation

  • Provide a small, fast safety net that validates core API workflows and permissions on every merge.
  • Ensure the frontend can build on CI so regressions in the Next.js app are caught early.
  • Offer a simple, reproducible local command to run the same checks developers will see in CI.

Description

  • Add in-repo API smoke tests under apps/dashboard_api/tests/ with an in-memory SQLite fixture (conftest.py) and a scenario that exercises ticket -> approve -> queue -> run -> finish.
  • Tests cover the /health check and the admin permission guard via require_admin.
  • Add .github/workflows/ci.yml with two jobs: api-tests (installs Python deps and runs pytest) and web-build (runs npm ci and npm run build in apps/dashboard_web).
  • Update README.md and README.zh-CN.md to document the CI and show the local test command (PYTHONPATH=apps/dashboard_api pytest -q apps/dashboard_api/tests).

Testing

  • Ran PYTHONPATH=apps/dashboard_api pytest -q apps/dashboard_api/tests and the suite completed successfully (3 passed).
  • Ran npm ci in apps/dashboard_web and dependency install succeeded.
  • Ran npm run build in apps/dashboard_web and the Next.js production build completed successfully.

Codex Task


Testing Result

image

@astromen-orbiter astromen-orbiter merged commit af7c158 into main Mar 3, 2026
2 checks passed
@astromen-orbiter astromen-orbiter deleted the codex/design-test-cases-for-github-actions branch March 3, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants