Skip to content

Commit

Permalink
ci: Add coverage
Browse files Browse the repository at this point in the history
This adds the coverage utility, to at least give an overview of how
much our testing covers
  • Loading branch information
techman83 committed Mar 10, 2024
1 parent 9ce9750 commit 38c9e13
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check Coverage

on:
pull_request:
branches:
- main

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install Cally test dependencies
run: pip install .[test]
- name: Run Coverage
run: coverage run -m pytest
- name: Get Cover
uses: orgoro/[email protected]
with:
coverageFile: path/to/coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ license = {file = "LICENSE.md"}
[project.optional-dependencies]
development = [
"black",
"coverage",
"isort",
"mypy",
"pytest",
Expand All @@ -31,6 +32,7 @@ development = [
]
test = [
"black",
"coverage",
"mypy",
"pytest",
"pytest-black",
Expand Down

0 comments on commit 38c9e13

Please sign in to comment.