This directory contains GitHub Actions workflows for continuous integration (CI) and deployment.
Runs on every push to main and on pull requests. Includes:
- Backend Tests: Django test suite with PostgreSQL
- Frontend Checks: ESLint, Prettier formatting, and build verification
- Backend Linting: Ruff and isort code quality checks
- Security Checks: Safety and Bandit for Python, npm audit for Node.js
Additional checks for pull requests:
- Test Coverage: Generates and uploads test coverage reports
- Dependency Review: Checks for security vulnerabilities in dependencies
You can run the same checks locally using the provided scripts:
# Install all dependencies
make install
# Run all CI checks
make ci-local
# Run individual checks
make test # Run tests only
make lint # Run linting only
make format # Format code
make security # Run security checks# Make the script executable (first time only)
chmod +x scripts/ci-local.sh
# Run all CI checks
./scripts/ci-local.shbackend/pyproject.toml- Ruff and isort configuration, dependency management via uvfrontend/.prettierignore- Prettier ignore patterns
Note: The CI workflow generates
requirements.txtfrompyproject.tomlusinguv exportfor Safety vulnerability scanning. This file is not committed to the repository.
The CI workflows use the following environment variables for testing:
ENVIRONMENT="" # the environment where your backend is running, for local development, use 'development'SECRET_KEY="" # your Django secret_key, can be re-generated if neededALLOWED_HOSTS="" # your domain (without https:// or http://)CORS_ALLOWED_ORIGINS="" # your domain (with https:// or http://)CSRF_TRUSTED_ORIGINS="" # your domain (with https:// or http://)DATABASE_URL="" # the url to access your PostgreSQL databaseCLOUDINARY_CLOUD_NAME="" # Your Cloudinary Cloud Name, can be found on the Cloudinary websiteCLOUDINARY_API_KEY="" # Your Cloudinary API Key, can be found on the Cloudinary websiteCLOUDINARY_API_SECRET="" # Your Cloudinary API Secret, can be found on the Cloudinary websiteGOOGLE_CLIENT_ID="" # your Google Client ID for google login (should match with frontend)ALLOWED_GOOGLE_HD="" # (optional) only allow specific email address domain to login (e.g., your-company.com)SHEET_ID="" # the Google Spreadsheet ID, can be found in the url of the sheet, sheet must be set to publicly visibleOPENAI_API_KEY="" # your OpenAI API Key, can be found on the OpenAI website
See the Environment Variables section in README.md for more details.
To add new CI checks:
- Update the appropriate workflow file in
.github/workflows/ - Add any new dependencies to
backend/pyproject.toml(backend) orfrontend/package.json(frontend) - Update the local CI script in
scripts/ci-local.sh - Update this README with documentation
- Tests failing: Check that all required environment variables are set
- Linting errors: Run
make formatto auto-fix formatting issues - Security warnings: Review and address any security vulnerabilities found
- Build failures: Ensure all dependencies are properly installed
If you encounter issues with the CI setup:
- Check the GitHub Actions logs for detailed error messages
- Run the local CI script to reproduce issues locally
- Ensure your local environment matches the CI environment (Python 3.11, Node.js 18)