Skip to content

Commit

Permalink
Added way to check code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
WaughB committed Jan 7, 2024
1 parent ce3e42f commit 5731612
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
branch = True
source = .
omit =
*/__pycache__/*
*/logs/*
27 changes: 27 additions & 0 deletions code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Python Code Coverage

on: [push, pull_request]

jobs:
coverage:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install -r requirements.txt
pip install coverage
- name: Run tests with coverage
run: coverage run -m pytest

- name: Generate coverage report
run: coverage report

0 comments on commit 5731612

Please sign in to comment.