Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
pull_request:
branches: [main]
types: [opened, synchronize]
push:
branches: [main]

permissions: {}

Expand All @@ -34,6 +36,7 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
Expand Down Expand Up @@ -80,3 +83,16 @@ jobs:
echo "::warning file=$file_name,line=$line_start,endLine=$line_end::$message"
done
done

- name: Generate coverage XML report
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: hatch run hatch-test.py3.12:coverage xml

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
with:
files: coverage.xml
flags: unit
use_oidc: true
fail_ci_if_error: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.coverage
coverage.xml
htmlcov/
.pytest_cache/
.pytype/
.ruff_cache/
Expand Down
15 changes: 15 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
coverage:
status:
project:
default:
target: auto
informational: true
patch:
default:
target: 70%
threshold: 5%
informational: true

flag_management:
default_rules:
carryforward: true
Loading