docs: update README and AGENTS.md with CI/CD and justfile info

This commit is contained in:
2026-03-31 21:48:58 -07:00
parent e08d72bfe6
commit 5f02726ba6
2 changed files with 126 additions and 8 deletions
+44
View File
@@ -109,10 +109,50 @@ npm run db:setup-postgres
**Note:** The database provider is automatically detected by Better Auth and Prisma.
### Running Tests
**Using just (recommended):**
- **All tests**: `just test` (unit + acceptance with SQLite)
- **Unit tests**: `just test-unit`
- **Acceptance tests (SQLite)**: `just test-acceptance-sqlite`
- **Acceptance tests (PostgreSQL)**: `just test-acceptance-postgres`
- **PR validation**: `just pr-validate` (what runs on pull requests)
**Using npm scripts:**
- **Unit tests**: `npm run test`
- **Acceptance tests**: `npm run test:acceptance`
- **Specific test**: `npm run test:acceptance -- --grep "test name"`
**CI-style acceptance tests with SQLite:**
```bash
DATABASE_PROVIDER=sqlite DATABASE_URL=file:./prisma/ci.db npm run test:acceptance
```
### CI/CD Pipeline
The project uses Gitea Actions for continuous integration:
**PR Workflow** (`.gitea/workflows/pr.yml`):
- Runs on pull requests to main
- Executes unit tests and acceptance tests with SQLite
- Analyzes commits for semantic versioning
- Comments suggested bump type on PRs
**Test Workflow** (`.gitea/workflows/test.yml`):
- Runs on all branch pushes
- Executes unit tests for quick feedback
- Skips auto-generated version bump commits
**Release Workflow** (`.gitea/workflows/release.yml`):
- Runs on main branch pushes
- Determines version bump type
- Bumps version and creates git tags
- Builds Docker images and runs tests
- Pushes to registry and deploys
**Database Strategy**:
- CI tests use SQLite (fast, no server required)
- Production uses PostgreSQL
- Switch with `DATABASE_PROVIDER` environment variable
## Key Files
### Configuration
@@ -170,6 +210,10 @@ npm run db:setup-postgres
- Utilities: camelCase (e.g., `elo-utils.ts`)
- Tests: `.test.ts` or `.test.tsx` suffix
## File Organization
See [docs/FILE_ORGANIZATION.md](docs/FILE_ORGANIZATION.md) for detailed file organization and structure.
## Resources
- **Better Auth Docs**: https://better-auth.com/docs