CI/CD Pipeline
CI Workflow (ci.yml)
Her push ve PR'da otomatik çalışır:
1. backend-lint
ruff check app/— Lintingruff format --check app/— Format kontrolümypy app/ --ignore-missing-imports— Type check
2. backend-test
- PostgreSQL 15 + Redis 7 servisler başlatılır
alembic upgrade head— Migration'lar uygulanırpytest tests/ -v --cov=app— Testler çalıştırılır
3. firmware-test
pio test -e native— PlatformIO unit testleri
4. frontend-lint
npm run lint— ESLintnpx tsc --noEmit— TypeScript kontrolü
5. frontend-build
npm run build— Production build
6. docker-build (sadece PR)
- Docker Buildx ile multi-platform build (push yok)
Deploy Workflow (deploy.yml)
CI başarılı olunca otomatik tetiklenir:
- SSH setup — webfactory/ssh-agent
- rsync — Dosya senkronizasyonu (exclude: .git, node_modules, .env, certs)
- .env oluştur — GitHub Secrets'tan
- TLS kontrol — SSL sertifika varlığı
- Infrastructure start — postgres, redis, emqx, minio
- Migration —
alembic upgrade head - Image build — backend, frontend (15dk timeout), modbus-poller
- Container start —
docker compose up -d - Health check — Backend, frontend, nginx HTTPS
- Code audit — Claude CLI ile post-deploy analiz
- Monitoring cron — health-check, container-monitor kurulumu
Release Workflow (release.yml)
Git tag push (v*) ile tetiklenir:
- GitHub release + changelog oluşturma
- ghcr.io'ya Docker image push (tag + latest)