Files
dashboard/.github/workflows
Alberto-Audrix 32a36cceff
CI / lint-and-test (push) Canceled after 0s
first commit
2026-07-28 08:55:05 +07:00
..
2026-07-28 08:55:05 +07:00
2026-07-28 08:55:05 +07:00

GitHub Actions CI/CD

This directory contains automated workflows for the chicken farm dashboard.

Workflows

CI Pipeline (ci.yml)

Triggers:

  • Push to main or master branch
  • Pull requests to main or master branch

What it does:

  1. ✅ Checks out code
  2. ✅ Sets up Node.js 18
  3. ✅ Installs frontend dependencies
  4. ✅ Runs ESLint (code quality check)
  5. ✅ Runs TypeScript type check (strict mode)
  6. ✅ Runs frontend tests
  7. ✅ Builds frontend (verifies build works)
  8. ✅ Installs backend dependencies
  9. ✅ Runs backend tests

Duration: ~3-5 minutes

Status: Tests run with continue-on-error: true for gradual adoption

How to View Results

  1. Go to your repository on GitHub
  2. Click "Actions" tab
  3. See all workflow runs and their status

Adding Status Badge to README

Add this to your main README.md:

![CI](https://github.com/YOUR-USERNAME/YOUR-REPO/workflows/CI/badge.svg)

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-check locally)
    • Linting errors (run npm run lint locally)
    • Build failures (run npm run build locally)
    • Test failures (run npm test locally)

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