1
1
version : 2.1
2
+ orbs :
3
+ codecov :
codecov/[email protected]
2
4
3
5
commands :
4
6
setup :
@@ -48,12 +50,14 @@ commands:
48
50
ninja -C build-gcc test
49
51
50
52
- run :
51
- name : Run gcov & upload coverage.
53
+ name : Run gcov
52
54
command : |
53
55
cd build-gcc
54
56
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
57
61
58
62
- run :
59
63
name : Valgrind for C tests.
@@ -116,14 +120,17 @@ commands:
116
120
python -m pytest -n2
117
121
118
122
- run :
119
- name : Upload LWT coverage
123
+ name : Generate coverage
120
124
command : |
121
125
# Make sure the C coverage reports aren't lying around
122
126
rm -fR build-gcc
123
127
ls -R
124
128
cd python/lwt_interface
125
129
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
127
134
128
135
- run :
129
136
name : Run Python tests
@@ -132,13 +139,17 @@ commands:
132
139
python -m pytest --cov=tskit --cov-report=xml --cov-branch -n2 tests/test_lowlevel.py tests/test_tables.py tests/test_file_format.py
133
140
134
141
- run :
135
- name : Upload Python coverage
142
+ name : Generate Python coverage
136
143
command : |
137
144
# Make sure the C coverage reports aren't lying around
138
145
rm -fR build-gcc
146
+ rm -f python/lwt_interface/*.gcov
139
147
cd python
140
148
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
142
153
143
154
- run :
144
155
name : Build Python package
@@ -191,6 +202,8 @@ jobs:
191
202
key : tskit-32-{{ .Branch }}-v7
192
203
paths :
193
204
- " /home/circleci/.local"
205
+ # We need to install curl for the codecov upload.
206
+ - run : sudo apt-get install -y curl
194
207
- compile_and_test
195
208
196
209
workflows :
0 commit comments