Skip to content

Update ortools version to 9.15.6755 #24

Update ortools version to 9.15.6755

Update ortools version to 9.15.6755 #24

Workflow file for this run

name: Backend CI
on:
push:
branches: [main, develop]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
pull_request:
branches: [main, develop]
paths:
- 'backend/**'
- '.github/workflows/backend-ci.yml'
jobs:
lint-and-test:
name: Python Lint & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install dependencies
run: |
cd backend
python -m pip install --upgrade pip
pip install flake8 black pytest pytest-cov bandit
pip install -r requirements.txt
- name: Lint with flake8
run: |
cd backend
flake8 app/ run.py --count --max-line-length=120 --statistics
- name: Check formatting with black
run: |
cd backend
black --check --line-length=120 app/ run.py
- name: Verify app can be imported
env:
SECRET_KEY: ci-test-secret-key-do-not-use-in-production
JWT_SECRET_KEY: ci-test-jwt-secret-do-not-use-in-production
DATABASE_URL: sqlite:///test.db
FLASK_ENV: testing
run: |
cd backend
python -c "from app import create_app; app = create_app(); print('App created successfully')"
- name: Run tests
env:
SECRET_KEY: ci-test-secret-key-do-not-use-in-production
JWT_SECRET_KEY: ci-test-jwt-secret-do-not-use-in-production
DATABASE_URL: sqlite:///test.db
FLASK_ENV: testing
run: |
cd backend
python -m pytest tests/ -v --cov=app --cov-report=term-missing --tb=short 2>/dev/null || echo "No tests found yet - skipping"
- name: Security check with bandit
run: |
cd backend
bandit -r app/ -ll || true