Some checks failed
CI Pipeline / changes (push) Has been cancelled
CI Pipeline / core (push) Has been cancelled
CI Pipeline / trading-backend (push) Has been cancelled
CI Pipeline / trading-data-service (push) Has been cancelled
CI Pipeline / trading-frontend (push) Has been cancelled
CI Pipeline / erp-core (push) Has been cancelled
CI Pipeline / erp-mecanicas (push) Has been cancelled
CI Pipeline / gamilit-backend (push) Has been cancelled
CI Pipeline / gamilit-frontend (push) Has been cancelled
291 lines
9.0 KiB
YAML
291 lines
9.0 KiB
YAML
name: CI Pipeline
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main, develop]
|
|
|
|
env:
|
|
NODE_VERSION: '20'
|
|
PYTHON_VERSION: '3.11'
|
|
|
|
jobs:
|
|
# =============================================================================
|
|
# Detect Changes
|
|
# =============================================================================
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
core: ${{ steps.changes.outputs.core }}
|
|
trading: ${{ steps.changes.outputs.trading }}
|
|
erp: ${{ steps.changes.outputs.erp }}
|
|
gamilit: ${{ steps.changes.outputs.gamilit }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dorny/paths-filter@v2
|
|
id: changes
|
|
with:
|
|
filters: |
|
|
core:
|
|
- 'core/**'
|
|
trading:
|
|
- 'projects/trading-platform/**'
|
|
erp:
|
|
- 'projects/erp-suite/**'
|
|
gamilit:
|
|
- 'projects/gamilit/**'
|
|
|
|
# =============================================================================
|
|
# Core Modules
|
|
# =============================================================================
|
|
core:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.core == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'npm'
|
|
cache-dependency-path: core/modules/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: core/modules
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
working-directory: core/modules
|
|
run: npm run lint --if-present
|
|
|
|
- name: Type check
|
|
working-directory: core/modules
|
|
run: npm run typecheck --if-present
|
|
|
|
- name: Test
|
|
working-directory: core/modules
|
|
run: npm test --if-present
|
|
|
|
# =============================================================================
|
|
# Trading Platform - Backend
|
|
# =============================================================================
|
|
trading-backend:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.trading == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'npm'
|
|
cache-dependency-path: projects/trading-platform/apps/backend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: projects/trading-platform/apps/backend
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
working-directory: projects/trading-platform/apps/backend
|
|
run: npm run lint --if-present
|
|
|
|
- name: Type check
|
|
working-directory: projects/trading-platform/apps/backend
|
|
run: npm run typecheck --if-present
|
|
|
|
- name: Build
|
|
working-directory: projects/trading-platform/apps/backend
|
|
run: npm run build --if-present
|
|
|
|
- name: Test
|
|
working-directory: projects/trading-platform/apps/backend
|
|
run: npm test --if-present
|
|
|
|
# =============================================================================
|
|
# Trading Platform - Data Service (Python)
|
|
# =============================================================================
|
|
trading-data-service:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.trading == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
cache: 'pip'
|
|
cache-dependency-path: projects/trading-platform/apps/data-service/requirements.txt
|
|
|
|
- name: Install dependencies
|
|
working-directory: projects/trading-platform/apps/data-service
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Lint with ruff
|
|
working-directory: projects/trading-platform/apps/data-service
|
|
run: |
|
|
pip install ruff
|
|
ruff check src/
|
|
|
|
- name: Type check with mypy
|
|
working-directory: projects/trading-platform/apps/data-service
|
|
run: |
|
|
pip install mypy
|
|
mypy src/ --ignore-missing-imports || true
|
|
|
|
- name: Test
|
|
working-directory: projects/trading-platform/apps/data-service
|
|
run: pytest --if-present || true
|
|
|
|
# =============================================================================
|
|
# Trading Platform - Frontend
|
|
# =============================================================================
|
|
trading-frontend:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.trading == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'npm'
|
|
cache-dependency-path: projects/trading-platform/apps/frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: projects/trading-platform/apps/frontend
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
working-directory: projects/trading-platform/apps/frontend
|
|
run: npm run lint --if-present
|
|
|
|
- name: Type check
|
|
working-directory: projects/trading-platform/apps/frontend
|
|
run: npm run typecheck --if-present
|
|
|
|
- name: Build
|
|
working-directory: projects/trading-platform/apps/frontend
|
|
run: npm run build
|
|
|
|
# =============================================================================
|
|
# ERP Suite - Core
|
|
# =============================================================================
|
|
erp-core:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.erp == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'npm'
|
|
cache-dependency-path: projects/erp-suite/apps/erp-core/backend/package-lock.json
|
|
|
|
- name: Install backend dependencies
|
|
working-directory: projects/erp-suite/apps/erp-core/backend
|
|
run: npm ci --if-present || true
|
|
|
|
- name: Lint backend
|
|
working-directory: projects/erp-suite/apps/erp-core/backend
|
|
run: npm run lint --if-present || true
|
|
|
|
- name: Type check backend
|
|
working-directory: projects/erp-suite/apps/erp-core/backend
|
|
run: npm run typecheck --if-present || true
|
|
|
|
# =============================================================================
|
|
# ERP Suite - Mecánicas Diesel
|
|
# =============================================================================
|
|
erp-mecanicas:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.erp == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
|
|
- name: Install dependencies
|
|
working-directory: projects/erp-suite/apps/verticales/mecanicas-diesel/backend
|
|
run: npm ci --if-present || npm install
|
|
|
|
- name: Type check
|
|
working-directory: projects/erp-suite/apps/verticales/mecanicas-diesel/backend
|
|
run: npm run typecheck --if-present || npx tsc --noEmit
|
|
|
|
# =============================================================================
|
|
# Gamilit
|
|
# =============================================================================
|
|
gamilit-backend:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.gamilit == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'npm'
|
|
cache-dependency-path: projects/gamilit/apps/backend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: projects/gamilit/apps/backend
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
working-directory: projects/gamilit/apps/backend
|
|
run: npm run lint
|
|
|
|
- name: Build
|
|
working-directory: projects/gamilit/apps/backend
|
|
run: npm run build
|
|
|
|
- name: Test
|
|
working-directory: projects/gamilit/apps/backend
|
|
run: npm test --if-present
|
|
|
|
gamilit-frontend:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.gamilit == 'true' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODE_VERSION }}
|
|
cache: 'npm'
|
|
cache-dependency-path: projects/gamilit/apps/frontend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
working-directory: projects/gamilit/apps/frontend
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
working-directory: projects/gamilit/apps/frontend
|
|
run: npm run lint
|
|
|
|
- name: Build
|
|
working-directory: projects/gamilit/apps/frontend
|
|
run: npm run build
|