Skip to content

modified .yml to get correct coverage version #42

modified .yml to get correct coverage version

modified .yml to get correct coverage version #42

Workflow file for this run

on: [push, pull_request]
jobs:
run-unittests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
- name: Create and activate virtual environment
run: |
python -m venv venv # Create a virtual environment
source venv/bin/activate # Activate the virtual environment
- name: Install dependencies
run: |
source venv/bin/activate # Ensure the virtual environment is active
pip install --upgrade pip # Upgrade pip within the virtual environment
pip install -r requirements.txt # Install dependencies from requirements.txt
- name: Run tests with coverage
run: |
source venv/bin/activate # Ensure the virtual environment is active
pytest --cov=. --cov-report=xml # Generate coverage report in XML format
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: coverage.xml # Path to your coverage report
token: ${{ secrets.CODECOV_TOKEN }} # Set this in your repository secrets