Skip to content

Merge pull request #7 from jujumo/main #62

Merge pull request #7 from jujumo/main

Merge pull request #7 from jujumo/main #62

Workflow file for this run

name: Code Coverage
on: [push, pull_request]
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: [3.8, 3.9]
env:
OS: ${{ matrix.os }}
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest coverage
pip install -e .
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Generate coverage report
run: |
coverage run -m unittest discover tests
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
files: ./coverage.xml
name: codecov-umbrella
verbose: true
- name: Check coverage threshold
run: |
coverage report --fail-under=90