Skip to content

feat: expose generator settings and tighten availability and CLI vali… #11

feat: expose generator settings and tighten availability and CLI vali…

feat: expose generator settings and tighten availability and CLI vali… #11

Workflow file for this run

name: CI
on:
push:
branches: [main, "feature/**"]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12"]
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install project and quality tools
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[demo,dev]"
- name: Lint
run: ruff check .
- name: Check formatting
run: ruff format --check .
- name: Run test suite
run: pytest -q
- name: Compile Python sources
run: python -m compileall -q src app.py scripts tests
- name: Smoke-test installed CLI
run: |
heatops-evaluate --mode heat_first --format json > /tmp/heatops-result.json
python -c 'import json; p=json.load(open("/tmp/heatops-result.json")); assert p["comparison"]["optimized_result"]["status"] in {"OPTIMAL", "FEASIBLE"}'
- name: Smoke-test fleet CLI
run: |
python scripts/generate_scenarios.py --jobs 5 --crews 2 --seed 42 --output /tmp/fleet.json
heatops-evaluate --scenario /tmp/fleet.json --policy delay_budget --format json > /tmp/fleet-result.json
python -c 'import json; p=json.load(open("/tmp/fleet-result.json")); assert p["comparison"]["delay_budget"]["metrics"]["constraint_violations"] == 0'