Skip to content

Commit 115d030

Browse files
committed
trying to fix coverage action
1 parent 0a45417 commit 115d030

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,13 @@ jobs:
4545
- name: Run test suite
4646
run: tox --skip-pkg-install
4747
env:
48-
COVERAGE_FILE: "coverage.${{ matrix.os }}.${{ matrix.py }}"
48+
COVERAGE_FILE: ".coverage.${{ matrix.os }}.${{ matrix.py }}"
4949
- name: Store coverage file
5050
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
5151
with:
5252
name: coverage.${{ matrix.os }}.${{ matrix.py }}
53-
path: coverage.${{ matrix.os }}.${{ matrix.py }}
53+
path: .coverage.${{ matrix.os }}.${{ matrix.py }}
54+
include-hidden-files: true
5455
if-no-files-found: error
5556

5657
coverage:
@@ -61,8 +62,6 @@ jobs:
6162
permissions:
6263
pull-requests: write
6364
contents: write
64-
env:
65-
COVERAGE_FILE: "coverage"
6665
steps:
6766
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6867

@@ -79,7 +78,6 @@ jobs:
7978
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8079
MERGE_COVERAGE_FILES: true
8180
ANNOTATE_MISSING_LINES: true
82-
VERBOSE: true
8381

8482
- name: Store Pull Request comment to be posted
8583
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

pyproject.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,19 @@ relative_files = true
8080
source = ["descope"]
8181
omit = ["descope/flask/*"]
8282

83+
[tool.coverage.paths]
84+
# Normalize paths across OSes so combined reports resolve to the same files
85+
source = [
86+
"descope",
87+
"*/descope",
88+
"*\\descope",
89+
]
90+
8391

8492
[tool.coverage.report]
85-
fail_under = 98
93+
# Don't enforce threshold during JSON export used by the GitHub Action.
94+
# Enforce thresholds explicitly in CI if desired.
95+
fail_under = 0
8696
skip_covered = true
8797
skip_empty = true
8898

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ commands =
3232

3333
[testenv:report]
3434
commands =
35-
poetry run coverage report
35+
poetry run coverage report --fail-under=98
3636
depends =
3737
py3{12, 11, 10, 9, 8}
3838

0 commit comments

Comments
 (0)