Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coverage to pytwin #61

Merged
merged 6 commits into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ jobs:
env:
ANSYSLMD_LICENSE_FILE: 1055@${{ secrets.LICENSE_SERVER }}

- name: Upload coverage artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest.xml
path: .cov/coverage.xml
Revathyvenugopal162 marked this conversation as resolved.
Show resolved Hide resolved
retention-days: 7

check-licenses:
name: "Check library dependencies ship with valid licenses"
runs-on: ubuntu-latest
Expand Down
21 changes: 21 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
comment:
layout: "diff"
behavior: default
require_changes: true # Avoid coverage comment if no files are changed.

coverage:
status:
project:
default:
target: 80%
patch:
default:
# basic
target: auto
threshold: 10%
if_not_found: success
if_ci_failed: error
if_no_uploads: error
ignore:
- "examples" # ignore folder and all its contents
- "doc" # ignore folder and all its contents
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,14 @@ default_section = "THIRDPARTY"
src_paths = ["doc", "src", "tests"]

[tool.coverage.run]
source = ["pytwin"]
source = ["ansys.pytwin"]

[tool.coverage.report]
show_missing = true

[tool.pytest.ini_options]
minversion = "7.1"
addopts = "-ra --cov=ansys.pytwin --cov-report html:.cov/html"
testpaths = [
"tests",
]