@@ -52,13 +52,21 @@ jobs:
52
52
- name : Run unit tests
53
53
run : |
54
54
mkdir unittest-py38-release-reports
55
- coverage run -m pytest --doctest-modules -p conftest --junitxml=unittest-py38-release-reports/junit.xml opacus
55
+ coverage run -m pytest --doctest-modules -p conftest opacus
56
56
coverage report -i -m
57
+ # Format into xml to be used for coveralls
58
+ coverage xml -i
57
59
- name : Store test results
58
60
uses : actions/upload-artifact@v4
59
61
with :
60
62
name : unittest-py38-release-reports
61
63
path : unittest-py38-release-reports
64
+ - name : Send coverage to Coveralls (parallel)
65
+ uses : coverallsapp/github-action@v2
66
+ with :
67
+ format : cobertura
68
+ parallel : true
69
+ flag-name : run-1
62
70
63
71
unittest_py39_torch_release :
64
72
runs-on : ubuntu-latest
@@ -77,13 +85,19 @@ jobs:
77
85
- name : Run unit tests
78
86
run : |
79
87
mkdir unittest-py39-release-reports
80
- coverage run -m pytest --doctest-modules -p conftest --junitxml=unittest-py39-release-reports/junit.xml opacus
81
- coverage report -i -m
88
+ coverage run -m pytest --doctest-modules -p conftest opacus
89
+ coverage xml -i
82
90
- name : Store test results
83
91
uses : actions/upload-artifact@v4
84
92
with :
85
93
name : unittest-py39-release-reports
86
94
path : unittest-py39-release-reports
95
+ - name : Send coverage to Coveralls (parallel)
96
+ uses : coverallsapp/github-action@v2
97
+ with :
98
+ format : cobertura
99
+ parallel : true
100
+ flag-name : run-2
87
101
88
102
prv_accountant_values :
89
103
runs-on : ubuntu-latest
@@ -150,11 +164,18 @@ jobs:
150
164
coverage run examples/mnist.py --lr 0.25 --sigma 0.7 -c 1.5 --batch-size 64 --epochs 1 --data-root runs/mnist/data --n-runs 1 --device cpu
151
165
python -c "import torch; accuracy = torch.load('run_results_mnist_0.25_0.7_1.5_64_1.pt'); exit(0) if (accuracy[0]>0.78 and accuracy[0]<0.95) else exit(1)"
152
166
coverage report -i -m
167
+ coverage xml -i
153
168
- name : Store test results
154
169
uses : actions/upload-artifact@v4
155
170
with :
156
171
name : mnist-cpu-reports
157
172
path : runs/mnist/test-reports
173
+ - name : Send coverage to Coveralls (parallel)
174
+ uses : coverallsapp/github-action@v2
175
+ with :
176
+ format : cobertura
177
+ parallel : true
178
+ flag-name : run-3
158
179
159
180
# ####### FINISH COVERALLS ##########
160
181
finish_coveralls_parallel :
@@ -168,3 +189,4 @@ jobs:
168
189
with :
169
190
github_token : ${{ secrets.GITHUB_TOKEN }}
170
191
parallel-finished : true
192
+ carryforward : " run-1,run-2,run-3"
0 commit comments