58ca4e68db
- Go backend API with full CRUD for all modules (CRM, Sales, Finance, HR, Legal, Marketing, Support, Purchase, Inventory, Projects, Automation, Analytics) - Rust analytics service with parallel report generation - C runtime with POSIX shared memory IPC - PostgreSQL schema with 30+ tables, full migrations - Redis cache, sessions, pub/sub - Kafka event streaming with Zookeeper - WebSocket hub for real-time updates - Automation engine with cron jobs, workflows, event triggers - JWT authentication, multi-tenant from start - Docker Compose with all services - Nginx reverse proxy with rate limiting - Integration tests passing - Feature gap analysis against Fortnox/Odoo/Visma Refs: BOC-001
80 lines
2.1 KiB
YAML
80 lines
2.1 KiB
YAML
name: CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install flake8 pytest
|
|
pip install -r requirements.txt
|
|
|
|
- name: Lint with flake8
|
|
run: |
|
|
flake8 src/ --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
flake8 src/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.11'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pytest pytest-cov
|
|
pip install -r requirements.txt
|
|
|
|
- name: Test with pytest
|
|
run: pytest tests/ --cov=src --cov-report=xml
|
|
|
|
build:
|
|
needs: [lint, test]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Docker image
|
|
run: |
|
|
docker build -t atm-anomaly-detection:${{ github.sha }} .
|
|
docker tag atm-anomaly-detection:${{ github.sha }} atm-anomaly-detection:latest
|
|
|
|
- name: Test Docker image
|
|
run: |
|
|
docker run --rm atm-anomaly-detection:${{ github.sha }} python -c "import src.models.anomaly_detector; print('Import OK')"
|
|
|
|
deploy:
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/main'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Deploy to production
|
|
run: |
|
|
echo "Deploying to production server..."
|
|
# Add your deployment commands here
|
|
# Example: ssh user@server "cd /app && docker-compose pull && docker-compose up -d"
|