Delete an unrequired file #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Running Code Coverage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Python 3.7.17 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.7.17 | |
- name: Install dependencies | |
run: | | |
pip install coverage | |
pip install pytest-cov | |
pip install -r requirements.txt | |
echo requirements installed | |
- name: Run the tests | |
run: | | |
cd tests | |
pytest --cov=./ --cov-report=xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
# 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@v2 | |
# 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 | |
# cd tests | |
# pytest --cov=./ --cov-report=xml | |
# - name: Upload coverage to Codecov | |
# uses: codecov/codecov-action@v2 | |
# 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 |