Files
corestate/.github/workflows/microservices.yml
Wiktor d89118eb70 feat: complete full-fledged mobile app and comprehensive system improvements
## Major Features Added:

### 📱 Complete Native Mobile App
- Full Android app with Material 3 design and Jetpack Compose
- Dashboard, Backup, Files, and Settings screens with rich functionality
- Biometric authentication, file management, and real-time sync
- Modern UI components and navigation with proper state management
- Comprehensive permissions and Android manifest configuration

### 🚀 Enhanced CI/CD Pipelines
- 7 comprehensive GitHub workflows with proper testing and deployment
- Multi-language support (Kotlin, Rust, Python, Node.js, Scala)
- Security scanning with Trivy, CodeQL, Semgrep, and infrastructure validation
- Performance testing with automated benchmarking and reporting
- ML training pipeline with model validation and artifact management

### 🏗️ Production-Ready Infrastructure
- Complete Terraform configuration with VPC, EKS, security groups, IAM
- Kubernetes deployments with proper resource management and health checks
- Service mesh integration with Prometheus monitoring
- Multi-environment support with secrets management

### 🤖 Advanced ML Capabilities
- Enhanced anomaly detection with Variational Autoencoders and Isolation Forest
- Sophisticated backup prediction with ensemble methods and temporal features
- 500+ lines of production-ready ML code with proper error handling
- Model serving infrastructure with fallback mechanisms

### 🔧 Complete Microservices Architecture
- 5 new production-ready services with Docker containers:
  - Compression Engine (Rust) - Multi-algorithm compression optimization
  - Deduplication Service (Python) - Content-defined chunking
  - Encryption Service (Node.js) - Advanced cryptography and key management
  - Index Service (Kotlin) - Elasticsearch integration for fast search
  - Enhanced existing services with comprehensive dependency management

### 📊 System Improvements
- Removed web dashboard in favor of full mobile app
- Enhanced build configurations across all services
- Comprehensive dependency updates with security patches
- Cross-platform mobile support (Android + iOS KMP ready)

## Technical Details:
- 91 files changed: 9,459 additions, 2,600 deletions
- Modern Android app with Hilt DI, Room, Compose, WebRTC, gRPC
- Production infrastructure with proper security and monitoring
- Advanced ML models with ensemble approaches and feature engineering
- Comprehensive CI/CD with security scanning and performance testing
2025-07-23 02:55:21 +02:00

216 lines
6.3 KiB
YAML

name: Microservices CI
on:
push:
branches: [ main, develop ]
paths:
- 'services/**'
- 'shared/**'
pull_request:
branches: [ main ]
paths:
- 'services/**'
- 'shared/**'
env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx2048m -Dorg.gradle.daemon=false"
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
test-kotlin-services:
runs-on: ubuntu-latest
strategy:
matrix:
service: [backup-engine]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Test ${{ matrix.service }}
run: ./gradlew :services:${{ matrix.service }}:test
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: test-results-${{ matrix.service }}
path: |
services/${{ matrix.service }}/build/reports/tests/
services/${{ matrix.service }}/build/test-results/
test-rust-services:
runs-on: ubuntu-latest
strategy:
matrix:
service: [storage-hal]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache cargo dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
services/${{ matrix.service }}/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('services/${{ matrix.service }}/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Run tests for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
cargo test
- name: Run clippy for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
cargo clippy -- -D warnings
- name: Check formatting for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
cargo fmt --check
test-python-services:
runs-on: ubuntu-latest
strategy:
matrix:
service: [ml-optimizer]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache pip packages
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('services/${{ matrix.service }}/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov black flake8
- name: Run tests for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
pytest --cov=. --cov-report=xml
- name: Check code formatting for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
black --check .
- name: Run linting for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
flake8 .
test-nodejs-services:
runs-on: ubuntu-latest
strategy:
matrix:
service: [sync-coordinator]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js 18
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'services/${{ matrix.service }}/package-lock.json'
- name: Install dependencies for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
npm ci
- name: Run tests for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
npm test
- name: Run linting for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
npm run lint
- name: Type check for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
npm run type-check
build-docker-images:
needs: [test-kotlin-services, test-rust-services, test-python-services, test-nodejs-services]
runs-on: ubuntu-latest
strategy:
matrix:
service: [backup-engine, storage-hal, ml-optimizer, sync-coordinator]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/${{ matrix.service }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./services/${{ matrix.service }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}