Skip to content

Commit a8e9f67

Browse files
authored
Merge pull request #2742 from benjeffery/fix-codecov
Fix codecov
2 parents b7cf0dc + c72109f commit a8e9f67

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.circleci/config.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
version: 2.1
2+
orbs:
3+
codecov: codecov/[email protected]
24

35
commands:
46
setup:
@@ -48,12 +50,14 @@ commands:
4850
ninja -C build-gcc test
4951
5052
- run:
51-
name: Run gcov & upload coverage.
53+
name: Run gcov
5254
command: |
5355
cd build-gcc
5456
find ../c/tskit/*.c -type f -printf "%f\n" | xargs -i gcov -pb libtskit.a.p/tskit_{}.gcno ../c/tskit/{}
55-
cd ..
56-
bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy -F c-tests
57+
58+
- codecov/upload:
59+
flags: c-tests
60+
token: CODECOV_TOKEN
5761

5862
- run:
5963
name: Valgrind for C tests.
@@ -116,14 +120,17 @@ commands:
116120
python -m pytest -n2
117121
118122
- run:
119-
name: Upload LWT coverage
123+
name: Generate coverage
120124
command: |
121125
# Make sure the C coverage reports aren't lying around
122126
rm -fR build-gcc
123127
ls -R
124128
cd python/lwt_interface
125129
gcov -pb -o ./build/temp.linux*/*.gcno example_c_module.c
126-
bash <(curl -s https://codecov.io/bash) -X gcov -F lwt-tests
130+
131+
- codecov/upload:
132+
flags: lwt-tests
133+
token: CODECOV_TOKEN
127134

128135
- run:
129136
name: Run Python tests
@@ -132,13 +139,17 @@ commands:
132139
python -m pytest --cov=tskit --cov-report=xml --cov-branch -n2 tests/test_lowlevel.py tests/test_tables.py tests/test_file_format.py
133140
134141
- run:
135-
name: Upload Python coverage
142+
name: Generate Python coverage
136143
command: |
137144
# Make sure the C coverage reports aren't lying around
138145
rm -fR build-gcc
146+
rm -f python/lwt_interface/*.gcov
139147
cd python
140148
gcov -pb -o ./build/temp.linux*/*.gcno _tskitmodule.c
141-
bash <(curl -s https://codecov.io/bash) -X gcov -F python-c-tests
149+
150+
- codecov/upload:
151+
flags: python-c-tests
152+
token: CODECOV_TOKEN
142153

143154
- run:
144155
name: Build Python package
@@ -191,6 +202,8 @@ jobs:
191202
key: tskit-32-{{ .Branch }}-v7
192203
paths:
193204
- "/home/circleci/.local"
205+
# We need to install curl for the codecov upload.
206+
- run: sudo apt-get install -y curl
194207
- compile_and_test
195208

196209
workflows:

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
id: venv-cache
4141
with:
4242
path: venv
43-
key: docs-venv-v2-${{ hashFiles(env.REQUIREMENTS) }}
43+
key: docs-venv-v3-${{ hashFiles(env.REQUIREMENTS) }}
4444

4545
- name: Create venv and install deps (one by one to avoid conflict errors)
4646
if: steps.venv-cache.outputs.cache-hit != 'true'

0 commit comments

Comments
 (0)