Skip to content

fix: Fix CI/CD pipeline failures - OrionAI validation and Docker buil… #5

fix: Fix CI/CD pipeline failures - OrionAI validation and Docker buil…

fix: Fix CI/CD pipeline failures - OrionAI validation and Docker buil… #5

Workflow file for this run

name: OrionAI CI/CD

Check failure on line 1 in .github/workflows/beckman.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/beckman.yml

Invalid workflow file

(Line: 123, Col: 5): 'name' is already defined, (Line: 124, Col: 5): 'runs-on' is already defined, (Line: 127, Col: 5): 'steps' is already defined
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test-python:
name: Python Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r Python/requirements.txt
pip install pytest pytest-cov
- name: Run tests
run: |
cd Python
pytest test_orionai.py -v --cov=orionai --cov-report=xml
- name: Upload coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
with:
file: ./Python/coverage.xml
test-cpp:
name: C++ Build Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate C++ Headers
run: |
echo "Checking C++ syntax..."
find Source -name "*.h" -o -name "*.cpp" | xargs grep -L "OrionAI" || true
lint:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install linters
run: |
pip install flake8 black pylint
- name: Run flake8
run: |
flake8 Python/ --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 Python/ --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Check formatting with black
run: |
black --check Python/
security:
name: Security Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install security tools
run: |
pip install bandit safety
- name: Run bandit
run: |
bandit -r Python/ -f json -o bandit-report.json || true
- name: Check dependencies
run: |
safety check --file Python/requirements.txt || true
docker:
name: Docker Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: |
docker build -t orionai:test .
- name: Prepare Dashboard build context
run: |
cp Python/orionai.py Dashboard/
- name: Build Dashboard Docker
run: |
cd Dashboard
docker build -t orionai-dashboard:test . integration:
name: Integration Tests
runs-on: ubuntu-latest
needs: [test-python, docker]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install OrionAI
run: |
cd Python
pip install -e .
- name: Run CLI tests
run: |
python Tools/awesome.py test
- name: Validate examples
run: |
cd Python
python examples.py