Files
corestate/.github/workflows/microservices.yml
Wiktor 0f0cfdb075 Complete CoreState v2.0 Android-managed backup system
Created by Wiktor/overspend1 - Revolutionary enterprise backup solution:

 Features:
- Complete Android-only management (no web dashboards)
- AI-powered backup optimization and anomaly detection
- Real-time WebSocket communication and CRDT sync
- Hardware-accelerated encryption with KernelSU integration
- Comprehensive microservices architecture
- System-level file monitoring and COW snapshots

🏗️ Implementation:
- Android app with complete system administration
- Rust daemon with Android bridge and gRPC services
- ML-powered backup prediction and scheduling optimization
- KernelSU module with native kernel integration
- Enterprise microservices (Kotlin, Python, Node.js, Rust)
- Production-ready CI/CD with proper release packaging

📱 Management via Android:
- Real-time backup monitoring and control
- Service management and configuration
- Device registration and security management
- Performance monitoring and troubleshooting
- ML analytics dashboard and insights

🔒 Enterprise Security:
- End-to-end encryption with hardware acceleration
- Multi-device key management and rotation
- Zero-trust architecture with device authentication
- Audit logging and security event monitoring

Author: Wiktor (overspend1)
Version: 2.0.0
License: MIT
2025-07-23 23:10:41 +02:00

216 lines
6.4 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, compression-engine]
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.json'
- name: Install dependencies for ${{ matrix.service }}
run: |
cd services/${{ matrix.service }}
npm install
- 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, compression-engine, 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 }}