Skip to content

Commit

Permalink
Added CI coverage report (#118)
Browse files Browse the repository at this point in the history
* Added CI coverage report

* update action to 3.2
  • Loading branch information
dogversioning authored Jul 19, 2024
1 parent f396f0d commit 92c2bde
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
name: CI
on: [push]
on:
pull_request:
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'
jobs:
unittest:
name: unit tests
Expand All @@ -18,7 +26,20 @@ jobs:
pip install ".[test]"
- name: Test with pytest
run: |
export AWS_DEFAULT_REGION=us-east-1; python -m pytest
export AWS_DEFAULT_REGION=us-east-1; python -m pytest --cov-report xml --cov=src tests
- name: Log missing coverage
run: |
coverage report -m --skip-covered
- name: Generate coverage report
if: github.ref != 'refs/heads/main'
uses: orgoro/coverage@v3.2
with:
coverageFile: coverage.xml
token: ${{ secrets.GITHUB_TOKEN }}
thresholdAll: .9
thresholdNew: 1
thresholdModified: .95

lint:
runs-on: ubuntu-22.04
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ test = [
"freezegun",
"moto[s3,athena,sns] == 4.1.5",
"pytest",
"pytest-cov",
"pytest-mock"
]
dev = [
Expand Down

0 comments on commit 92c2bde

Please sign in to comment.