Skip to content

Created a python file-newfile #120

Created a python file-newfile

Created a python file-newfile #120

Workflow file for this run

# This workflow will install Python dependencies, run tests and create a Code Coverage Report
name: Code Coverage
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Generate coverage report
run:|
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest
pip install pytest-cov
export PYTHONPATH=src
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage.xml,
flags: unittests
name: codecov-umbrella
path_to_write_report: ./coverage/codecov_report.txt
verbose: true