Skip to content

fix: Remove unused imports and fix linting errors #34

fix: Remove unused imports and fix linting errors

fix: Remove unused imports and fix linting errors #34

Workflow file for this run

name: Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests with coverage
run: |
pytest --cov=src/orchestrator --cov-report=xml --cov-report=term
- name: Extract coverage percentage
id: coverage
run: |
# Extract coverage percentage from XML report
COVERAGE=$(python -c "import xml.etree.ElementTree as ET; root = ET.parse('coverage.xml').getroot(); print(round(float(root.attrib['line-rate']) * 100, 2))")
echo "COVERAGE=$COVERAGE" >> $GITHUB_OUTPUT
echo "Coverage: $COVERAGE%"
- name: Create coverage badge
uses: schneegans/dynamic-badges-action@v1.6.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: <YOUR_GIST_ID> # You'll need to create a gist and add its ID here
filename: orchestrator-coverage.json
label: coverage
message: ${{ steps.coverage.outputs.COVERAGE }}%
valColorRange: ${{ steps.coverage.outputs.COVERAGE }}
maxColorRange: 100
minColorRange: 0
- name: Upload coverage to Codecov (optional)
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false