Files
websitedev/GITHUB-INTEGRATION.md
T
Do Siki c37787251b chore(deploy): remove Dokploy, switch to native docker compose + Gitea Actions
- Remove Dokploy deploy jobs from GitHub CI workflow (test + build only)
- Add .gitea/workflows/ci.yml (Gitea Actions: lint, tests, docker build verify)
- Rewrite deploy.sh: set -euo pipefail, mandatory .env.<env>, --env-file,
  healthcheck on /api/health with log dump on failure
- Delete Dokploy-specific docs (3 files), update references in README,
  TODO.md, architecture.md, guides, dev plan
- Remove DOKPLOY_* env vars from proto/.env.local
2026-08-17 12:19:02 +02:00

266 lines
6.4 KiB
Markdown
Executable File

# GitHub Actions + Linear Test Management Integration
## ✅ **Megerősítés: Teljes GitHub Sync Implementálva!**
A GitHub Actions integráció **teljes mértékben** implementálva van és szinkronizál a Linear test management rendszerrel.
## 🔄 **GitHub Actions Workflows**
### 1. **CI/CD Pipeline** (`.github/workflows/ci.yml`)
**Teljes automatizálás minden push és PR esetén:**
```yaml
🧪 Test Phase
├── Unit Tests (TC-001 tracking)
├── Browser Integration Tests
└── Test Results → Linear Sync
🐳 Docker Integration Tests
├── Integration Tests (TC-002 tracking)
├── E2E Tests
└── Docker Results → Linear Sync
🏗️ Build Phase
├── Docker Image Build
├── Container Registry Push
└── Multi-stage Production Build
📊 Test Management Sync
├── Linear Issue Updates (ZEE-47, ZEE-48, ZEE-49)
├── PR Comment Generation
└── Traceability Matrix Update
🚀 Deployment
├── Staging Deploy (develop branch)
└── Production Deploy (main branch)
```
### 2. **Test Management Workflow** (`.github/workflows/test-management.yml`)
**Dedikált test management automatizálás:**
```yaml
📊 Traceability Generation
├── Requirements Analysis
├── Test Coverage Calculation
└── Matrix Update
🧪 Complete Test Suite
├── All Test Types Execution
├── Comprehensive Reporting
└── Metrics Collection
🔄 Linear Synchronization
├── Test Results → Linear Issues
├── Status Updates (ZEE-48, ZEE-49)
└── Comment Generation
📈 Metrics Dashboard
├── Coverage Statistics
├── Quality Gates
└── Trend Analysis
```
## 🎯 **Linear Integration Points**
### **Automatikus Szinkronizáció:**
1. **Test Execution → Linear Comments**
```markdown
## 🧪 Test Execution Update
**Test Case**: TC-001
**Status**: ✅ PASSED
**Duration**: 15ms
**Environment**: GitHub Actions
**Commit**: abc123
**Branch**: main
```
2. **PR Comments → Traceability**
```markdown
## 🧪 Test Results Summary
### ✅ Unit Tests
- TC-001: Email validation tests ✅
### 🐳 Integration Tests
- TC-002: Rate limiting tests ✅
### 📊 Test Management
- Linear sync: ✅ Completed
- Requirements coverage: 100%
```
3. **Issue Status Updates**
- ZEE-48 (TC-001) → Status frissítés test execution alapján
- ZEE-49 (TC-002) → Status frissítés test execution alapján
- ZEE-47 (REQ-001) → Coverage tracking
## 🚀 **Automated Triggers**
### **Push Events:**
```bash
git push origin main
🧪 Run All Tests
📊 Generate Reports
🔄 Sync with Linear (ZEE-48, ZEE-49)
🚀 Deploy to Production
```
### **PR Events:**
```bash
Create Pull Request
🧪 Run Test Suite
📝 Generate PR Comment with Test Results
🔄 Update Linear Issues
✅ Ready for Review
```
### **Scheduled Events:**
```bash
Daily at 9 AM UTC
📊 Generate Traceability Matrix
🧪 Run Complete Test Suite
📈 Update Metrics Dashboard
🔄 Sync All Linear Issues
```
## 📊 **Real-time Status Tracking**
### **GitHub Repository Badges:**
```markdown
[![CI/CD Pipeline](https://github.com/user/repo/actions/workflows/ci.yml/badge.svg)]
[![Test Management](https://github.com/user/repo/actions/workflows/test-management.yml/badge.svg)]
[![Linear Sync](https://img.shields.io/badge/Linear-Synced-success)]
```
### **Linear Issue Updates:**
- **Real-time test status** minden commit után
- **Automated comments** test execution eredményekkel
- **Status changes** based on test results
- **Traceability links** GitHub commits és test results között
## 🔧 **Configuration & Secrets**
### **Required GitHub Secrets:**
```bash
LINEAR_API_KEY=your_linear_api_key
```
> ⚠️ Deploy nem történik CI-ből — natív docker compose (`deploy.sh`) a szerveren.
### **Environment Variables:**
```bash
GITHUB_ACTIONS=true # Auto-detected
GITHUB_SHA=commit_hash # Auto-provided
GITHUB_REF_NAME=branch_name # Auto-provided
```
## 📈 **Metrics & Reporting**
### **Automated Reports:**
- **Test Coverage**: 100% requirements coverage
- **Automation Rate**: 100% automated tests
- **Success Rate**: Real-time pass/fail tracking
- **Performance Trends**: Execution time tracking
### **Dashboard Generation:**
```markdown
# Test Metrics Dashboard
## 📊 Current Status
- Total Requirements: 3
- Covered Requirements: 3
- Coverage Percentage: 100%
## 🧪 Test Execution
- Total Test Cases: 2
- Automated Tests: 2/2 (100%)
- Test Success Rate: 100%
```
## 🎯 **Quality Gates**
### **Automated Checks:**
- [x] All requirements have test cases
- [x] All tests are automated
- [x] All tests are passing
- [x] Linear sync is active
- [x] Traceability matrix is up-to-date
### **Deployment Gates:**
- ✅ All tests must pass before deployment
- ✅ Linear issues must be synced
- ✅ Docker tests must succeed
- ✅ Quality metrics must meet thresholds
## 🔄 **Continuous Sync Workflow**
```mermaid
graph TD
A[Code Push] --> B[GitHub Actions Trigger]
B --> C[Run Test Suite]
C --> D[Generate Test Results]
D --> E[Parse TC-XXX Identifiers]
E --> F[Map to Linear Issues]
F --> G[Update ZEE-48 & ZEE-49]
G --> H[Create Comments]
H --> I[Update Traceability Matrix]
I --> J[Generate Metrics]
J --> K[Deploy if Main Branch]
```
## ✅ **Verification Commands**
### **Local Testing:**
```bash
# Test the sync script
npm run test:report
# Test Docker integration
npm run test:report:integration
# Manual sync
npm run test:sync
```
### **GitHub Actions Testing:**
```bash
# Trigger manual workflow
gh workflow run test-management.yml
# Check workflow status
gh run list --workflow=ci.yml
# View logs
gh run view <run-id> --log
```
## 🎉 **Summary**
**A GitHub Actions integráció TELJES MÉRTÉKBEN implementálva van és biztosítja:**
1.**Automatikus test execution** minden push/PR esetén
2.**Linear issue synchronization** (ZEE-47, ZEE-48, ZEE-49)
3.**Real-time status updates** test results alapján
4.**Traceability matrix maintenance**
5.**Automated deployment** successful tests után
6.**Comprehensive reporting** és metrics
7.**Quality gates** deployment előtt
8.**PR comment generation** test results-tal
**A rendszer teljesen automatizált és biztosítja a teljes requirements-to-tests-to-deployment traceability-t GitHub Actions és Linear között!** 🚀