Skip to content

Coverage Report

Coverage Report #23

name: Coverage Report
on:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
workflow_dispatch: # Allow manual trigger
jobs:
coverage:
name: Generate Coverage Report
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y portaudio19-dev ffmpeg
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-ci.txt
pip install pytest pytest-asyncio pytest-cov
- name: Run full test suite with coverage
continue-on-error: true # Allow workflow to continue even if some tests fail
run: |
pytest tests/ -v --cov=. --cov-report=html --cov-report=term --cov-report=xml || true
env:
QUBES_ENV: test
PYTHONPATH: ${{ github.workspace }}
- name: Upload coverage HTML report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage_html/
retention-days: 30
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: fullsuite
name: weekly-coverage
fail_ci_if_error: false
- name: Comment coverage summary
if: github.event_name == 'schedule'
run: |
echo "## Coverage Report Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Full coverage report generated and uploaded as artifact." >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Download the HTML report from the Actions artifacts." >> $GITHUB_STEP_SUMMARY