1818 steps :
1919 - name : System Dependencies
2020 run : |
21+ sudo apt-get update
2122 sudo apt install -y build-essential \
2223 libcairo2-dev \
2324 pkg-config \
@@ -47,15 +48,39 @@ jobs:
4748 - name : pytest
4849 run : |
4950 # python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/ddm/test/unit
50- python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv atomsci/modac/test/unit
51- cd atomsci/ddm/test/unit && python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv
51+ cd atomsci/modac/test/unit && python3.9 -m pytest --capture=sys --capture=fd --cov=atomsci/ -vv
52+ cd ../../../../ atomsci/ddm/test/unit && python3.9 -m pytest -m "not moe_required" -n 2 --capture=sys --capture=fd --cov=atomsci -vv
5253 env :
5354 ENV : test
5455
55- - name : Upload coverage reports to Codecov
56- uses : codecov/codecov-action@v4
57- env :
58- 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+
5984 pytest-integrative-1 :
6085 runs-on : ubuntu-24.04
6186 strategy :
6489 steps :
6590 - name : System Dependencies
6691 run : |
92+ sudo apt-get update
6793 sudo apt install -y build-essential \
6894 libcairo2-dev \
6995 pkg-config \
@@ -98,10 +124,32 @@ jobs:
98124 env :
99125 ENV : test
100126
101- - name : Upload coverage reports to Codecov
102- uses : codecov/codecov-action@v4
103- env :
104- 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+
105153 pytest-integrative-2 :
106154 runs-on : ubuntu-24.04
107155 strategy :
@@ -110,6 +158,7 @@ jobs:
110158 steps :
111159 - name : System Dependencies
112160 run : |
161+ sudo apt-get update
113162 sudo apt install -y build-essential \
114163 libcairo2-dev \
115164 pkg-config \
@@ -139,15 +188,37 @@ jobs:
139188 - name : pytest
140189 run : |
141190 # TODO: Run this test with pytest for paralell testing
142- # python3.9 -m pytest -n 2 --capture=sys --capture=fd --cov=atomsci -vv atomsci/ddm/test/integrative
143191 cd atomsci/ddm/test/integrative && ./integrative_batch_chunk_tests 1
192+ echo 'done'
144193 env :
145194 ENV : test
146195
147- - name : Upload coverage reports to Codecov
148- uses : codecov/codecov-action@v4
149- env :
150- 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+
151222 pytest-integrative-3 :
152223 runs-on : ubuntu-24.04
153224 strategy :
@@ -156,6 +227,7 @@ jobs:
156227 steps :
157228 - name : System Dependencies
158229 run : |
230+ sudo apt-get update
159231 sudo apt install -y build-essential \
160232 libcairo2-dev \
161233 pkg-config \
@@ -190,10 +262,32 @@ jobs:
190262 env :
191263 ENV : test
192264
193- - name : Upload coverage reports to Codecov
194- uses : codecov/codecov-action@v4
195- env :
196- 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+
197291 pytest-integrative-4 :
198292 runs-on : ubuntu-24.04
199293 strategy :
@@ -202,6 +296,7 @@ jobs:
202296 steps :
203297 - name : System Dependencies
204298 run : |
299+ sudo apt-get update
205300 sudo apt install -y build-essential \
206301 libcairo2-dev \
207302 pkg-config \
@@ -236,7 +331,70 @@ jobs:
236331 env :
237332 ENV : test
238333
239- - 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
240394 uses : codecov/codecov-action@v4
395+ with :
396+ files : ./coverage.xml
397+ flags : unittests
398+ name : codecov-umbrella
241399 env :
242- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
400+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments