steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov
pip install -r requirements.txt
- name: Setup package
run: python setup.py install
- name: Pytest with Generate coverage report
run: pytest --cov=<package_name> --cov-report=xml:./coverage.xml # import <package_name>
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: pytest
directory: ./coverage/reports/
files: ./coverage.xml
fail_ci_if_error: true
verbose: true