@@ -53,10 +53,34 @@ jobs:
5353 env :
5454 ENV : test
5555
56- - name : Upload coverage reports to Codecov
57- uses : codecov/codecov-action@v4
58- env :
59- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
56+ - name : Debug - Find all coverage files
57+ run : |
58+ echo "=== Current directory ==="
59+ pwd
60+ echo ""
61+ echo "=== Contents of current directory ==="
62+ ls -la
63+ echo ""
64+ echo "=== Searching for ALL .coverage files recursively ==="
65+ find . -name ".coverage*" -type f 2>/dev/null || echo "No .coverage files found"
66+ echo ""
67+ echo "=== Contents of test directory ==="
68+ ls -la atomsci/ddm/test/integrative/ || echo "Directory not found"
69+ echo ""
70+ echo "=== Checking if coverage was even run ==="
71+ which coverage
72+ coverage --version || echo "Coverage not installed"
73+
74+ - name : Save coverage
75+ uses : actions/upload-artifact@v4
76+ with :
77+ name : coverage-pytest-unit
78+ path : |
79+ atomsci/ddm/test/unit/.coverage*
80+ atomsci/modac/test/unit/.coverage*
81+ include-hidden-files : true
82+ if-no-files-found : error
83+
6084 pytest-integrative-1 :
6185 runs-on : ubuntu-24.04
6286 strategy :
@@ -100,10 +124,32 @@ jobs:
100124 env :
101125 ENV : test
102126
103- - name : Upload coverage reports to Codecov
104- uses : codecov/codecov-action@v4
105- env :
106- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
127+ - name : Debug - Find all coverage files
128+ run : |
129+ echo "=== Current directory ==="
130+ pwd
131+ echo ""
132+ echo "=== Contents of current directory ==="
133+ ls -la
134+ echo ""
135+ echo "=== Searching for ALL .coverage files recursively ==="
136+ find . -name ".coverage*" -type f 2>/dev/null || echo "No .coverage files found"
137+ echo ""
138+ echo "=== Contents of test directory ==="
139+ ls -la atomsci/ddm/test/integrative/ || echo "Directory not found"
140+ echo ""
141+ echo "=== Checking if coverage was even run ==="
142+ which coverage
143+ coverage --version || echo "Coverage not installed"
144+
145+ - name : Save coverage
146+ uses : actions/upload-artifact@v4
147+ with :
148+ name : coverage-pytest-integrative-1
149+ path : atomsci/ddm/test/integrative/**/.coverage*
150+ include-hidden-files : true
151+ if-no-files-found : error
152+
107153 pytest-integrative-2 :
108154 runs-on : ubuntu-24.04
109155 strategy :
@@ -147,10 +193,32 @@ jobs:
147193 env :
148194 ENV : test
149195
150- - name : Upload coverage reports to Codecov
151- uses : codecov/codecov-action@v4
152- env :
153- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
196+ - name : Debug - Find all coverage files
197+ run : |
198+ echo "=== Current directory ==="
199+ pwd
200+ echo ""
201+ echo "=== Contents of current directory ==="
202+ ls -la
203+ echo ""
204+ echo "=== Searching for ALL .coverage files recursively ==="
205+ find . -name ".coverage*" -type f 2>/dev/null || echo "No .coverage files found"
206+ echo ""
207+ echo "=== Contents of test directory ==="
208+ ls -la atomsci/ddm/test/integrative/ || echo "Directory not found"
209+ echo ""
210+ echo "=== Checking if coverage was even run ==="
211+ which coverage
212+ coverage --version || echo "Coverage not installed"
213+
214+ - name : Save coverage
215+ uses : actions/upload-artifact@v4
216+ with :
217+ name : coverage-pytest-integrative-2
218+ path : atomsci/ddm/test/integrative/**/.coverage*
219+ include-hidden-files : true
220+ if-no-files-found : error
221+
154222 pytest-integrative-3 :
155223 runs-on : ubuntu-24.04
156224 strategy :
@@ -194,10 +262,32 @@ jobs:
194262 env :
195263 ENV : test
196264
197- - name : Upload coverage reports to Codecov
198- uses : codecov/codecov-action@v4
199- env :
200- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
265+ - name : Debug - Find all coverage files
266+ run : |
267+ echo "=== Current directory ==="
268+ pwd
269+ echo ""
270+ echo "=== Contents of current directory ==="
271+ ls -la
272+ echo ""
273+ echo "=== Searching for ALL .coverage files recursively ==="
274+ find . -name ".coverage*" -type f 2>/dev/null || echo "No .coverage files found"
275+ echo ""
276+ echo "=== Contents of test directory ==="
277+ ls -la atomsci/ddm/test/integrative/ || echo "Directory not found"
278+ echo ""
279+ echo "=== Checking if coverage was even run ==="
280+ which coverage
281+ coverage --version || echo "Coverage not installed"
282+
283+ - name : Save coverage
284+ uses : actions/upload-artifact@v4
285+ with :
286+ name : coverage-pytest-integrative-3
287+ path : atomsci/ddm/test/integrative/**/.coverage*
288+ include-hidden-files : true
289+ if-no-files-found : error
290+
201291 pytest-integrative-4 :
202292 runs-on : ubuntu-24.04
203293 strategy :
@@ -241,7 +331,70 @@ jobs:
241331 env :
242332 ENV : test
243333
244- - name : Upload coverage reports to Codecov
334+ - name : Debug - Find all coverage files
335+ run : |
336+ echo "=== Current directory ==="
337+ pwd
338+ echo ""
339+ echo "=== Contents of current directory ==="
340+ ls -la
341+ echo ""
342+ echo "=== Searching for ALL .coverage files recursively ==="
343+ find . -name ".coverage*" -type f 2>/dev/null || echo "No .coverage files found"
344+ echo ""
345+ echo "=== Contents of test directory ==="
346+ ls -la atomsci/ddm/test/integrative/ || echo "Directory not found"
347+ echo ""
348+ echo "=== Checking if coverage was even run ==="
349+ which coverage
350+ coverage --version || echo "Coverage not installed"
351+
352+ - name : Save coverage
353+ uses : actions/upload-artifact@v4
354+ with :
355+ name : coverage-pytest-integrative-4
356+ path : atomsci/ddm/test/integrative/**/.coverage*
357+ include-hidden-files : true
358+ if-no-files-found : error
359+
360+ coverage-merge :
361+ runs-on : ubuntu-24.04
362+ needs : [pytest-unit, pytest-integrative-1, pytest-integrative-2, pytest-integrative-3, pytest-integrative-4]
363+ steps :
364+ - uses : actions/checkout@v3
365+ - name : Set up Python
366+ uses : actions/setup-python@v4
367+ with :
368+ python-version : " 3.9"
369+
370+ - name : Install coverage
371+ run : pip install coverage
372+
373+ - name : Download all coverage artifacts
374+ uses : actions/download-artifact@v5
375+ with :
376+ path : coverage-reports
377+
378+ - name : Merge coverage reports
379+ run : |
380+ # List directory structure for debugging
381+ ls -la
382+ ls -la coverage-reports/ || echo "coverage-reports directory not found"
383+
384+ # Find and combine all coverage files
385+ find coverage-reports -name ".coverage*" -type f
386+
387+ # Combine all coverage files
388+ coverage combine $(find coverage-reports -name ".coverage*" -type f -print)
389+
390+ # Generate XML report for codecov
391+ coverage xml
392+
393+ - name : Upload merged coverage to Codecov
245394 uses : codecov/codecov-action@v4
395+ with :
396+ files : ./coverage.xml
397+ flags : unittests
398+ name : codecov-umbrella
246399 env :
247- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
400+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments