Skip to content

Commit 4a72236

Browse files
committed
CI: Use codecov orb
1 parent ef5a671 commit 4a72236

File tree

1 file changed

+12
-25
lines changed

1 file changed

+12
-25
lines changed

.circleci/config.yml

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
version: 2.1
22
orbs:
33
docker: circleci/[email protected]
4+
codecov: codecov/[email protected]
45

56
jobs:
67
build:
@@ -222,9 +223,6 @@ jobs:
222223
steps:
223224
- attach_workspace:
224225
at: /tmp
225-
- run:
226-
name: Get codecov
227-
command: python -m pip install codecov
228226
- restore_cache:
229227
keys:
230228
- build-v1-{{ .Branch }}-{{ .Revision }}
@@ -274,12 +272,9 @@ jobs:
274272
--ignore=niworkflows/func/tests/ \
275273
niworkflows/
276274
277-
- run:
278-
name: Submit unit test coverage
279-
command: |
280-
cd /tmp/src/niworkflows
281-
python -m codecov --file /tmp/tests/summaries/unittests.xml \
282-
--flags unittests -e CIRCLE_JOB
275+
- codecov/upload:
276+
file: /tmp/tests/summaries/unittests.xml
277+
flags: unittests
283278

284279
- run:
285280
name: Run reportlet tests
@@ -294,12 +289,10 @@ jobs:
294289
pytest -n auto --junit-xml=/tmp/summaries/reportlets.xml \
295290
--cov niworkflows --cov-report xml:/tmp/summaries/reportlets.xml \
296291
niworkflows/tests/
297-
- run:
298-
name: Submit reportlet test coverage
299-
command: |
300-
cd /tmp/src/niworkflows
301-
python -m codecov --file /tmp/tests/summaries/reportlets.xml \
302-
--flags reportlettests -e CIRCLE_JOB
292+
293+
- codecov/upload:
294+
file: /tmp/tests/summaries/reportlets.xml
295+
flags: reportlettests
303296

304297
- run:
305298
name: Clean up tests directory
@@ -417,16 +410,10 @@ jobs:
417410
-e COVERAGE_FILE=/tmp/masks/reports/.coverage \
418411
-v /tmp/masks/reports:/tmp/masks/reports \
419412
niworkflows:latest coverage xml -o coverage.xml
420-
- run:
421-
name: Get codecov
422-
command: python -m pip install codecov
423-
- run:
424-
name: Submit masks test coverage
425-
working_directory: /tmp/src/niworkflows
426-
command: |
427-
cp /tmp/masks/reports/coverage.xml .
428-
sed -i "s+/src/niworkflows+/tmp/src/niworkflows+g" coverage.xml
429-
python -m codecov --file coverage.xml --flags masks -e CIRCLE_JOB
413+
414+
- codecov/upload:
415+
file: /tmp/tests/summaries/unittests.xml
416+
flags: masks
430417

431418
test_package:
432419
docker:

0 commit comments

Comments
 (0)