Skip to content

Commit

Permalink
Merge pull request #301 from ImperialCollegeLondon/badges
Browse files Browse the repository at this point in the history
Set up codecov workflow and badges
  • Loading branch information
dalonsoa authored Oct 1, 2024
2 parents dd02924 + faf07b7 commit 0a710e5
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/ci_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,17 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: pip install .[dev]

- name: Run tests
run: pytest
run: pytest

- name: Upload coverage to Codecov
if: success() && (matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10')
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# SWMManywhere: Synthesise Urban Drainage Network Models Anywhere in the World

<!-- markdown-link-check-disable -->
[![PyPI version shields.io](https://img.shields.io/pypi/v/swmmanywhere.svg)](https://pypi.python.org/pypi/swmmanywhere/)
[![Test and build](https://github.com/ImperialCollegeLondon/SWMManywhere/actions/workflows/ci.yml/badge.svg)](https://github.com/ImperialCollegeLondon/SWMManywhere/actions/workflows/ci.yml)
[![DOI](https://zenodo.org/badge/741903266.svg)](https://zenodo.org/doi/10.5281/zenodo.13837741)
[![codecov](https://codecov.io/gh/ImperialCollegeLondon/SWMManywhere/graph/badge.svg)](https://codecov.io/gh/ImperialCollegeLondon/SWMManywhere)
<!-- markdown-link-check-enable -->

SWMManywhere is a tool to synthesise urban drainage network models (UDMs) using
Expand Down
5 changes: 1 addition & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ plugins:
- mkdocs-jupyter:
execute: false
- search
- coverage:
page_name: coverage # default
html_report_dir: htmlcov # default
- include-markdown

repo_url: https://github.com/ImperialCollegeLondon/SWMManywhere
Expand Down Expand Up @@ -61,4 +58,4 @@ nav:
- Post processing: reference-post-processing.md
- Preprocessing: reference-preprocessing.md
- Config definitions: reference-defs.md
- Coverage report: coverage.md
- Coverage report: https://app.codecov.io/gh/ImperialCollegeLondon/SWMManywhere
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ optional-dependencies.dev = [
]
optional-dependencies.doc = [
"mkdocs",
"mkdocs-coverage",
"mkdocs-include-markdown-plugin",
"mkdocs-jupyter",
"mkdocs-material",
Expand Down Expand Up @@ -110,7 +109,7 @@ skip = "src/swmmanywhere/defs/iso_converter.yml,*.inp"
ignore-words-list = "gage,gages"

[tool.pytest.ini_options]
addopts = "-v --cov=src/swmmanywhere --cov-report=html --doctest-modules --ignore=src/swmmanywhere/logging.py"
addopts = "-v --cov=src/swmmanywhere --cov-report=xml --doctest-modules --ignore=src/swmmanywhere/logging.py"
markers = [
"downloads: mark a test as requiring downloads",
]
Expand Down

0 comments on commit 0a710e5

Please sign in to comment.