Skip to content

Commit 92e168b

Browse files
authored
Merge pull request #56 from The-Strategy-Unit/add-testing-workflow
add github action for testing coverage and badges to readme
2 parents 451b285 + 55607d9 commit 92e168b

File tree

4 files changed

+60
-1
lines changed

4 files changed

+60
-1
lines changed

.github/workflows/codecov.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: CodeCov
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-latest
12+
13+
defaults:
14+
run:
15+
shell: bash -l {0}
16+
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Install the latest version of uv
21+
uses: astral-sh/setup-uv@v6
22+
with:
23+
version: "latest"
24+
activate-environment: true
25+
26+
- name: Install dependencies
27+
run: uv pip install -e ".[dev]"
28+
29+
- name: Generate Report
30+
run: uv run pytest --cov=. tests/unit --ignore=tests --cov-branch --cov-report xml:coverage.xml
31+
32+
- name: Upload Coverage to Codecov
33+
uses: codecov/codecov-action@v5
34+
with:
35+
token: ${{ secrets.CODECOV_TOKEN }}

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Renal capacity model
22

3+
<!-- badges: start -->
4+
5+
[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)
6+
[![codecov](https://codecov.io/gh/The-Strategy-Unit/renal-capacity-model/graph/badge.svg?token=lr1OaInPCf)](https://codecov.io/gh/The-Strategy-Unit/renal-capacity-model)
7+
8+
<!-- badges: end -->
9+
310
Repository with Python code for the Renal Capacity Model, an open source implementation of the Discrete Event Simulation (DES) [Renal Services model created in collaboration with the Midlands Renal Operational Delivery Network (MRODN)](https://github.com/The-Strategy-Unit/renal-services).
411

512
⚠️ **Please note that the code in this repository is still in development**

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies = [
1010
"numpy>=2.3.1",
1111
"pandas>=2.3.1",
1212
"pytest>=8.4.2",
13+
"pytest-cov>=7.0.0",
1314
"simpy>=4.1.1",
1415
]
1516

@@ -22,4 +23,4 @@ omit=["tests/*"]
2223

2324
[tool.coverage.report]
2425
exclude_also = ['if __name__ == .__main__.:',
25-
'if self.config.trace:']
26+
'if self.config.trace:']

uv.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)