- Introduced make commands for E2E tests using Testcontainers and Schemathesis. - Updated `.env.demo` with configurable OAuth settings for Google and GitHub. - Enhanced `README.md` with updated environment setup instructions. - Added E2E testing dependencies and markers in `pyproject.toml` for real PostgreSQL and API contract validation. - Included new libraries (`arrow`, `attrs`, `docker`, etc.) for testing and schema validation workflows.
GitHub Actions Workflows
This directory contains CI/CD workflow templates for automated testing and deployment.
🚀 Quick Setup
To enable CI/CD workflows:
-
Rename template files by removing the
.templateextension:mv backend-tests.yml.template backend-tests.yml mv frontend-tests.yml.template frontend-tests.yml mv e2e-tests.yml.template e2e-tests.yml -
Set up Codecov (optional, for coverage badges):
- Sign up at https://codecov.io
- Add your repository
- Get your
CODECOV_TOKEN - Add it to GitHub repository secrets
-
Update README badges: Replace the static badges in the main README.md with:
[](https://github.com/YOUR_ORG/YOUR_REPO/actions/workflows/backend-tests.yml) [](https://codecov.io/gh/YOUR_ORG/YOUR_REPO) [](https://github.com/YOUR_ORG/YOUR_REPO/actions/workflows/frontend-tests.yml) [](https://codecov.io/gh/YOUR_ORG/YOUR_REPO) [](https://github.com/YOUR_ORG/YOUR_REPO/actions/workflows/e2e-tests.yml)
📋 Workflow Descriptions
backend-tests.yml
- Runs on: Push to main/develop, PRs affecting backend code
- Tests: Backend unit and integration tests
- Coverage: Uploads to Codecov
- Database: Spins up PostgreSQL service
frontend-tests.yml
- Runs on: Push to main/develop, PRs affecting frontend code
- Tests: Frontend unit tests (Jest)
- Coverage: Uploads to Codecov
- Fast: Uses npm cache
e2e-tests.yml
- Runs on: All pushes and PRs
- Tests: End-to-end tests (Playwright)
- Coverage: Full stack integration
- Artifacts: Saves test reports for 30 days
🔧 Customization
Adjust trigger paths
Modify the paths section to control when workflows run:
paths:
- 'backend/**'
- 'shared/**' # Add if you have shared code
Change test commands
Update the test steps to match your needs:
- name: Run tests
run: pytest -v --custom-flag
Add deployment
Create a new workflow for deployment:
name: Deploy to Production
on:
push:
branches: [ main ]
tags: [ 'v*' ]
🛡️ Security
- Never commit secrets to workflows
- Use GitHub Secrets for sensitive data
- Review workflow permissions
- Keep actions up to date
📊 Coverage Reports
With Codecov enabled, you'll get:
- Coverage trends over time
- PR coverage comparisons
- Coverage per file/folder
- Interactive coverage explorer
Access at: https://codecov.io/gh/YOUR_ORG/YOUR_REPO
💡 Tips
- PR checks: Workflows run on PRs automatically
- Status checks: Set as required in branch protection
- Debug logs: Re-run with debug logging enabled
- Artifacts: Download from workflow run page
- Matrix builds: Test multiple Python/Node versions