Skip to content

Commit 566e454

Browse files
committed
fix(coverage): run coverage in git repo
1 parent 953da16 commit 566e454

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

.circleci/config.yml

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ jobs:
186186
steps:
187187
- attach_workspace:
188188
at: /tmp
189+
- checkout:
190+
path: /tmp/src/niworkflows
191+
- run:
192+
name: Get codecov
193+
command: python -m pip install codecov
189194
- restore_cache:
190195
keys:
191196
- build-v1-{{ .Branch }}-{{ epoch }}
@@ -199,18 +204,6 @@ jobs:
199204
-v /tmp/docker:/var/lib/registry registry:2
200205
docker pull localhost:5000/niworkflows
201206
docker tag localhost:5000/niworkflows niworkflows:latest
202-
203-
- checkout:
204-
path: /tmp/src/niworkflows
205-
- run:
206-
name: Set PR number
207-
command: |
208-
echo 'export CIRCLE_PR_NUMBER="${CIRCLE_PR_NUMBER:-${CIRCLE_PULL_REQUEST##*/}}"' >> $BASH_ENV
209-
source $BASH_ENV
210-
echo $CIRCLE_PR_NUMBER
211-
- run:
212-
name: Get codecov
213-
command: python -m pip install codecov
214207
- run:
215208
name: Run unit tests
216209
no_output_timeout: 2h
@@ -231,8 +224,8 @@ jobs:
231224
- run:
232225
name: Submit unit test coverage
233226
command: |
234-
python -m codecov --file summaries/unittests.xml \
235-
--root /tmp/src/niworkflows \
227+
cd /tmp/src/niworkflows
228+
python -m codecov --file /tmp/tests/summaries/unittests.xml \
236229
--flags unittests -e CIRCLE_JOB
237230
238231
- run:
@@ -251,7 +244,8 @@ jobs:
251244
- run:
252245
name: Submit reportlet test coverage
253246
command: |
254-
python -m codecov --file summaries/reportlets.xml --root /tmp/src/niworkflows \
247+
cd /tmp/src/niworkflows
248+
python -m codecov --file /tmp/tests/summaries/reportlets.xml \
255249
--flags reportlettests -e CIRCLE_JOB
256250
257251
- run:

0 commit comments

Comments
 (0)