Skip to content

CI

CI #59

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-test.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-test.txt ]; then
pip install -r requirements-test.txt
else
pip install numpy scipy matplotlib pytest pytest-asyncio pytest-cov cma
fi
# Ensure coverage plugin is available even if not in requirements file
pip install --upgrade pytest-cov
- name: Run tests with coverage
run: |
pytest -q --cov=src --cov-report=xml
- name: Traceability with coverage
run: |
python traceability_check.py --coverage-xml coverage.xml --json-out traceability.json --fail-on-missing
# Optional: upload artifacts step omitted to keep workflow self-contained