add action to generate code coverage report

coverage
Andrew Port 2021-10-18 22:59:54 -07:00
parent d97519ffa3
commit 4ff68ac17a
1 changed files with 33 additions and 0 deletions

33
.github/workflows/coverage.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: Generate Coverage Report
on:
push:
pull_request:
jobs:
analyze:
name: Compute Coverage
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
# install deps
- name: Install dependencies for ${{ matrix.os }} Python ${{ matrix.python-version }}
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install scipy coverage
# find and run all unit tests
- name: Run unit tests
run: coverage run -m unittest discover test