Skip to content

Commit

Permalink
Added CI coverage report
Browse files Browse the repository at this point in the history
  • Loading branch information
dogversioning committed Jul 19, 2024
1 parent f396f0d commit 6f5db91
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.1
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 6f5db91

Please sign in to comment.