Skip to content

Commit a02a860

Browse files
watermarkhuCopilot
andauthored
ci: codecov (#122)
* ci: codecov * Update .github/workflows/qualify.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * upload * badge --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 279b7ee commit a02a860

2 files changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/qualify.yaml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ jobs:
112112
113113
- name: Run tests
114114
run: |
115-
if uv run pytest --cov mkdocstrings_handlers.matlab --tb=short -v --junit-xml=pytest.xml; then
115+
if uv run pytest -v --tb=short --color=yes \
116+
--cov mkdocstrings_handlers.matlab --cov-branch --cov-report=xml \
117+
--junit-xml=pytest.xml; then
116118
echo '# ✅ Tests passed' >> $GITHUB_STEP_SUMMARY
117119
else
118120
echo '# ❌ Tests failed' >> $GITHUB_STEP_SUMMARY
@@ -129,27 +131,45 @@ jobs:
129131
if: (!cancelled())
130132
uses: actions/upload-artifact@v4
131133
with:
132-
name: Test Results (Python ${{ matrix.python-version }})
133-
path: pytest.xml
134+
name: python${{ matrix.python-version }}
135+
path: "*.xml"
134136

135137
summary:
136138
runs-on: ubuntu-latest
137139
needs: [setup, test]
138140
if: (!cancelled())
139141
permissions:
140142
contents: read
141-
pull-requests: write
142143
checks: write
144+
id-token: write
145+
pull-requests: write
143146
steps:
147+
- name: Checkout
148+
uses: actions/checkout@v5
149+
with:
150+
fetch-depth: 2
151+
144152
- name: Download Artifacts
145153
uses: actions/download-artifact@v5
146154
with:
147-
path: artifacts
155+
path: results
148156

149157
- name: Publish Test Results
150158
uses: EnricoMi/publish-unit-test-result-action@v2
151159
with:
152-
files: "artifacts/**/*.xml"
160+
files: "results/**/pytest.xml"
161+
162+
- name: Upload coverage reports to Codecov
163+
uses: codecov/codecov-action@v5
164+
with:
165+
use_oidc: true
166+
directory: results
167+
168+
- name: Upload test results to Codecov
169+
uses: codecov/test-results-action@v1
170+
with:
171+
use_oidc: true
172+
directory: results
153173

154174
- name: Check all jobs
155175
run: |

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[![Qualify](https://github.com/watermarkhu/mkdocstrings-matlab/actions/workflows/qualify.yaml/badge.svg?branch=main)](https://github.com/watermarkhu/mkdocstrings-matlab/actions/workflows/qualify.yaml)
1010
[![documentation](https://img.shields.io/badge/docs-mkdocs-708FCC.svg?style=flat)](https://watermarkhu.nl/mkdocstrings-matlab)
1111
[![pypi version](https://img.shields.io/pypi/v/mkdocstrings-matlab.svg)](https://pypi.org/project/mkdocstrings-matlab/)
12+
[![codecov](https://codecov.io/github/watermarkhu/mkdocstrings-matlab/graph/badge.svg?token=T2csKmj2o2)](https://codecov.io/github/watermarkhu/mkdocstrings-matlab)
1213

1314
The MATLAB handler uses [maxx](https://github.com/watermarkhu/maxx) to collect documentation from MATLAB source code, which in turn uses [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) and its [MATLAB parser](https://github.com/acristoffers/tree-sitter-matlab).
1415

0 commit comments

Comments
 (0)