Skip to content

Commit ef35425

Browse files
committed
Upload coverage info to codecov
1 parent fa9a85b commit ef35425

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ jobs:
88
- name: setup just
99
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff #v3.0
1010
- name: setup python
11-
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
11+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 #v5.6.0
1212
with:
1313
python-version-file: pyproject.toml
1414
- name: setup uv
1515
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e #v6.8.0
1616
- name: setup repo
1717
run: just setup
18-
- name: run tests
19-
run: just test
18+
- name: run tests with test info
19+
run: just coverage xml
20+
- name: Upload coverage reports to Codecov
21+
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #v5.5.1
22+
with:
23+
token: ${{ secrets.CODECOV_TOKEN }}
2024
- name: run linting
2125
run: just lint

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
# dev artifacts
12
.aider*
23
!.aider.conf.yml
34
*.swp
45
__pycache__
56
.pyc
7+
8+
# sample repo
69
tests/fixtures/sample-workspace
10+
11+
# coverage artifacts
712
.coverage
13+
coverage.xml
14+
htmlcov

Justfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@ setup:
99
test file='':
1010
uv run pytest -x --pdb --pdbcls=IPython.terminal.debugger:TerminalPdb {{file}}
1111

12-
# Compute test coverage information
13-
coverage:
12+
# Compute test coverage information (formats: report, html, xml)
13+
coverage format='report':
1414
uv run coverage run --branch -m pytest
15-
uv run coverage html --omit=tests/**/*.py
16-
uv run coverage report --omit=tests/**/*.py
15+
uv run coverage {{format}} --omit=tests/**/*.py
1716

1817
# Run linters and formatters
1918
lint:

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)