ci: add GitHub Actions workflow
CI / Test (Python 3.11) (push) Has been cancelled
CI / Test (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Summary (push) Has been cancelled

- Add .github/workflows/ci.yml with pytest, coverage, linting, and type checking
- Test on Python 3.11 and 3.12
- Exclude slow tests by default
- Upload coverage reports as artifacts
- Add CI/CD documentation to AGENTS.md
This commit is contained in:
root
2026-03-06 21:17:54 +00:00
parent d179694fb2
commit 1b5d7f9238
2 changed files with 195 additions and 1 deletions
+41 -1
View File
@@ -350,4 +350,44 @@ video_url|anime_page_url|episode_title
- `pytest-cov` - Coverage reporting
- `pytest-mock` - Mocking utilities
- `pytest-timeout` - Test timeout protection
- `pytest-html` - HTML test reports
- `pytest-html` - HTML test reports
## CI/CD
### GitHub Actions
This project uses GitHub Actions for continuous integration. The workflow is defined in `.github/workflows/ci.yml`.
**Workflow Features:**
- Runs on push and pull requests to `main` and `dev` branches
- Tests on Python 3.11 and 3.12
- Excludes slow tests by default (`-m "not slow"`)
- Generates HTML coverage reports
- Runs linting with ruff
- Runs type checking with mypy
**Artifacts:**
- Coverage reports are uploaded as artifacts after each run
- Access via the "Actions" tab on GitHub
**Running locally:**
```bash
# Run tests (excluding slow tests)
pytest -m "not slow" --cov=app --cov-report=html
# Run all tests including slow ones
pytest
# Run only unit tests
pytest -m "unit"
# Run only integration tests
pytest -m "integration"
# Run linting
pip install ruff && ruff check app/
# Run type checking
pip install mypy && mypy app/
```