一键导入
testing-and-ci
// Testing conventions, CI pipeline rules, and smoke test coverage for SkillHub. Ensures agents write tests correctly and understand the CI gate requirements.
// Testing conventions, CI pipeline rules, and smoke test coverage for SkillHub. Ensures agents write tests correctly and understand the CI gate requirements.
API design conventions, namespace coordinate system, RBAC roles, ClawHub compatibility layer, OpenAPI contract sync rules, and CSRF/session handling.
Rules for the SkillHub backend Maven multi-module clean architecture. Ensures agents place new code in the correct module and respect dependency direction.
Code style, logging, and testing conventions for SkillHub backend (Java) and frontend (TypeScript). Use when writing or reviewing code.
The complete development workflow for SkillHub contributors including local dev, staging validation, testing, and PR creation. Ensures agents follow the correct sequence of steps.
Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.
PR title format, commit conventions, and pre-PR checklist for SkillHub. Use when preparing or reviewing pull requests.
| name | testing-and-ci |
| description | Testing conventions, CI pipeline rules, and smoke test coverage for SkillHub. Ensures agents write tests correctly and understand the CI gate requirements. |
| license | Apache-2.0 |
Use this skill when:
Tests live alongside source in each module's src/test/java/:
server/skillhub-app/src/test/java/ — Controller integration tests, service testsserver/skillhub-domain/src/test/java/ — Domain service unit testsserver/skillhub-auth/src/test/java/ — Auth flow testsTools: JUnit 5 + Mockito + AssertJ + Spring Boot test slices (@WebMvcTest, @DataJpaTest)
Build commands:
make test-backend-app # skillhub-app + dependencies (includes -am)
make test-backend # all backend modules
Never run ./mvnw -pl skillhub-app clean test directly under server/.
skillhub-app depends on sibling modules, and a standalone clean build can fall back to stale
artifacts from the local Maven repository, surfacing misleading cannot find symbol and
signature-mismatch errors. Use -am, or the Makefile targets above.
Test naming conventions:
{ControllerName}Test.java (e.g., SkillControllerTest.java){ServiceName}Test.java{FlowName}IntegrationTest.java{ControllerName}SecurityTest.javaTools: Vitest (unit), Playwright (E2E)
make test-frontend # Vitest unit tests (pnpm run test)
make test-e2e-frontend # Playwright E2E tests
make test-e2e-smoke-frontend # Playwright smoke tests (subset)
E2E tests live in web/e2e/.
Smoke tests validate end-to-end operator workflows against a running backend:
| Script | Purpose |
|---|---|
scripts/smoke-test.sh | Basic API health, auth, label CRUD |
scripts/namespace-smoke-test.sh | Namespace creation, membership, publishing |
scripts/governance-smoke-test.sh | Governance and moderation flows |
scripts/promotion-smoke-test.sh | Skill promotion between scopes |
When operator-facing workflows change, update the corresponding smoke test.
GitHub Actions workflows in .github/workflows/:
| Workflow | Trigger | Purpose |
|---|---|---|
pr-tests.yml | PR | Backend + frontend unit tests |
pr-e2e.yml | PR | E2E smoke tests against staging |
pr-batch-test-deploy.yml | workflow_dispatch | Batch test and deploy |
publish-images.yml | release published / workflow_dispatch | Build and publish Docker images to GHCR |
deploy-docs.yml | push to docs | Deploy documentation site |
issue-triage.yml | issues | Auto-triage incoming issues |
issue-backlog-rescore.yml | cron (every 6h) | Rescore backlog issues |
release-notes.yml | workflow_dispatch | Generate release notes |
deepwiki.yml | release published | Update DeepWiki documentation |
claim-issue-reward.yml | issue_comment | Auto-claim issue rewards |
statistic-member-reward.yml | cron/schedule | Calculate member rewards |
All workflows live in .github/workflows/. Deno scripts for triage, release notes, and rewards
live in .github/scripts/.
Before opening a PR, validate with staging:
make staging # Build backend Docker image + frontend static + smoke test
make staging-down # Tear down
SERVICE=web make staging-logs # View Nginx logs
Staging validates the containerized deployment path:
Dockerfile.dev)pnpm build), served by NginxIf staging passes, the environment stays running at:
http://localhosthttp://localhost:8080make test-backend-app passesmake typecheck-web passesmake lint-web passes (if frontend changed)make staging passes (full regression)make generate-api run and generated file committed