Skip to content

Commit cf01702

Browse files
authored
👷 Configure ☂️ Codecov reporting (#2224)
2 parents f21d5a4 + 310d427 commit cf01702

File tree

4 files changed

+46
-5
lines changed

4 files changed

+46
-5
lines changed

.circleci/main.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
version: 2.1
33
# Singularity started failing to set up on Circle circa May 2023, so those tests are currently disabled
44

5+
orbs:
6+
codecov: codecov/codecov@5
7+
58
parameters:
69
branch:
710
type: string
@@ -36,7 +39,8 @@ commands:
3639
name: "Combining and reporting coverage"
3740
command: |
3841
coverage combine
39-
coverage html --ignore-errors
42+
coverage xml -o coverage.xml # Generate XML report
43+
- codecov/upload
4044
configure-git-user:
4145
steps:
4246
- add_ssh_keys:
@@ -185,8 +189,6 @@ jobs:
185189
# key: coverage-singularity-lite-{{ .Revision }}
186190
- set-python-version
187191
- combine-coverage
188-
- store_artifacts:
189-
path: htmlcov
190192
push-branch-to-docker-hub:
191193
parameters:
192194
variant:

.codecov.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
codecov:
2+
branch: main
3+
4+
comment:
5+
layout: "diff, files"
6+
behavior: default
7+
require_changes: false
8+
require_base: false
9+
require_head: true
10+
hide_project_coverage: false
11+
12+
coverage:
13+
precision: 1
14+
range: "50..90"
15+
round: nearest
16+
status:
17+
project:
18+
default: # default is the status check's name, not default settings
19+
only_pulls: false
20+
target: auto
21+
threshold: "5"

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ C-PAC is distributed in the hope that it will be useful, but WITHOUT ANY WARRANT
99
You should have received a copy of the GNU Lesser General Public License along with C-PAC. If not, see <https://www.gnu.org/licenses/>. -->
1010
C-PAC: Configurable Pipeline for the Analysis of Connectomes
1111
============================================================
12-
<span title="Moving Beyond Processing and Analysis-Related Variation in Neuroscience">[![DOI for "Moving Beyond Processing and Analysis-Related Variation in Neuroscience"](https://zenodo.org/badge/DOI/10.1101/2021.12.01.470790.svg)](https://doi.org/10.1101/2021.12.01.470790)</span> <span title="FCP-INDI/C-PAC: CPAC Version 1.0.0 Beta">[![DOI for "FCP-INDI/C-PAC: CPAC Version 1.0.0 Beta"](https://zenodo.org/badge/DOI/10.5281/zenodo.164638.svg)](https://doi.org/10.5281/zenodo.164638)</span> [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FCP-INDI/C-PAC/main.svg)](https://results.pre-commit.ci/latest/github/FCP-INDI/C-PAC/main)
13-
12+
<span title="Moving Beyond Processing and Analysis-Related Variation in Neuroscience">[![DOI for "Moving Beyond Processing and Analysis-Related Variation in Neuroscience"](https://zenodo.org/badge/DOI/10.1101/2021.12.01.470790.svg)](https://doi.org/10.1101/2021.12.01.470790)</span> <span title="FCP-INDI/C-PAC: CPAC Version 1.0.0 Beta">[![DOI for "FCP-INDI/C-PAC: CPAC Version 1.0.0 Beta"](https://zenodo.org/badge/DOI/10.5281/zenodo.164638.svg)](https://doi.org/10.5281/zenodo.164638)</span> [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/FCP-INDI/C-PAC/main.svg)](https://results.pre-commit.ci/latest/github/FCP-INDI/C-PAC/main) [![codecov](https://codecov.io/github/FCP-INDI/C-PAC/graph/badge.svg?token=sWxXoDRf1M)](https://codecov.io/github/FCP-INDI/C-PAC)
1413

1514
[![LGPL](https://www.gnu.org/graphics/lgplv3-88x31.png)](./COPYING.LESSER)
1615

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,22 @@
1818
[build-system]
1919
requires = ["nipype==1.8.6", "numpy==1.25.1", "pyyaml==6.0", "setuptools<60.0", "voluptuous==0.13.1"]
2020
build-backend = "setuptools.build_meta"
21+
22+
[tool.coverage.paths]
23+
source = [
24+
"/code",
25+
"/home/circleci/project"
26+
]
27+
28+
[tool.coverage.report]
29+
ignore_errors = true
30+
include_namespace_packages = true
31+
skip_empty = true
32+
33+
[tool.coverage.run]
34+
branch = true
35+
relative_files = true
36+
source = [
37+
"CPAC",
38+
"dev/circleci_data"
39+
]

0 commit comments

Comments
 (0)