GitHub Actions CI/CD
This directory contains automated workflows for the chicken farm dashboard.
Workflows
CI Pipeline (ci.yml)
Triggers:
- Push to
mainormasterbranch - Pull requests to
mainormasterbranch
What it does:
- ✅ Checks out code
- ✅ Sets up Node.js 18
- ✅ Installs frontend dependencies
- ✅ Runs ESLint (code quality check)
- ✅ Runs TypeScript type check (strict mode)
- ✅ Runs frontend tests
- ✅ Builds frontend (verifies build works)
- ✅ Installs backend dependencies
- ✅ Runs backend tests
Duration: ~3-5 minutes
Status: Tests run with continue-on-error: true for gradual adoption
How to View Results
- Go to your repository on GitHub
- Click "Actions" tab
- See all workflow runs and their status
Adding Status Badge to README
Add this to your main README.md:

Replace YOUR-USERNAME and YOUR-REPO with your actual GitHub details.
Troubleshooting
If CI fails:
- Check the "Actions" tab for detailed logs
- Most common issues:
- TypeScript errors (run
npm run type-checklocally) - Linting errors (run
npm run lintlocally) - Build failures (run
npm run buildlocally) - Test failures (run
npm testlocally)
- TypeScript errors (run
Local testing before push:
# Run the same checks CI will run
npm run lint
npm run type-check
npm run build
npm test
cd backend
npm test
Future Improvements
Optional enhancements you can add later:
- Deploy to production on successful build
- Run tests against test database
- Add code coverage reports
- Slack/Discord notifications on failures