@@ -14,11 +14,12 @@ jobs:
1414 - name : Checkout
15151616 with :
17- submodules : ' true'
17+ submodules : " true"
1818 - name : Install dependencies
1919 run : pip install -r src/scripts/app/requirements.txt
2020 - name : Run tests and collect coverage
2121 run : pytest src/scripts/app/ --cov
22+
2223 - name : Upload coverage to Codecov (script)
2324 uses : ./
2425 with :
5556 - name : Checkout
56575758 with :
58- submodules : ' true'
59+ submodules : " true"
5960 - name : Install dependencies
6061 run : pip install -r src/scripts/app/requirements.txt
6162 - name : Run tests and collect coverage
@@ -104,32 +105,129 @@ jobs:
104105 - name : Checkout
105106106107 with :
107- submodules : ' true'
108+ submodules : " true"
108109 - name : Install deps
109110 run : |
110- apt-get install git
111+ apt-get update && apt-get install -y git
112+
111113 - name : Upload coverage to Codecov (script)
112114 uses : ./
113115 with :
114116 files : ./coverage/script/coverage-final.json
115- flags : script-${{ matrix.os }}
117+ flags : script-container
116118 name : codecov-script
117119 verbose : true
118120 token : ${{ secrets.CODECOV_TOKEN }}
119121 - name : Upload coverage to Codecov (demo)
120122 uses : ./
121123 with :
122124 files : ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json,./coverage/coverage-final.json
123- flags : demo-${{ matrix.os }}
125+ flags : demo-container
124126 name : codecov-demo
125127 verbose : true
126128 token : ${{ secrets.CODECOV_TOKEN }}
127129 - name : Upload coverage to Codecov (version)
128130 uses : ./
129131 with :
130132 files : ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json,./coverage/coverage-final.json
131- flags : version-${{ matrix.os }}
133+ flags : version-container
134+ name : codecov-version
135+ version : v9.1.0
136+ verbose : true
137+ token : ${{ secrets.CODECOV_TOKEN }}
138+
139+ run-alpine-missing-deps :
140+ runs-on : ubuntu-latest
141+ container : alpine:latest
142+ steps :
143+ - name : Checkout
144+ 145+ with :
146+ submodules : " true"
147+ - name : Upload coverage to Codecov (should fail due to missing dependencies)
148+ id : codecov-upload
149+ continue-on-error : true
150+ uses : ./
151+ with :
152+ files : ./coverage/script/coverage-final.json
153+ flags : script-alpine-missing-deps
154+ name : codecov-script
155+ verbose : true
156+ token : ${{ secrets.CODECOV_TOKEN }}
157+ - name : Verify dependency check failed
158+ run : |
159+ if [ "${{ steps.codecov-upload.outcome }}" = "failure" ]; then
160+ echo "✓ Action correctly failed due to missing dependencies"
161+ exit 0
162+ else
163+ echo "✗ Action should have failed but didn't"
164+ exit 1
165+ fi
166+
167+ run-alpine-success :
168+ runs-on : ubuntu-latest
169+ container : alpine:latest
170+ steps :
171+ - name : Install all required deps
172+ run : |
173+ apk add git curl gnupg bash
174+ - name : Checkout
175+ 176+ with :
177+ submodules : " true"
178+ - name : Upload coverage to Codecov (should succeed)
179+ uses : ./
180+ with :
181+ files : ./coverage/script/coverage-final.json
182+ flags : script-alpine-success
183+ name : codecov-script
184+ verbose : true
185+ token : ${{ secrets.CODECOV_TOKEN }}
186+ - name : Upload coverage to Codecov (demo)
187+ uses : ./
188+ with :
189+ files : ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json,./coverage/coverage-final.json
190+ flags : demo-alpine-success
191+ name : codecov-demo
192+ verbose : true
193+ token : ${{ secrets.CODECOV_TOKEN }}
194+ - name : Upload coverage to Codecov (version)
195+ uses : ./
196+ with :
197+ files : ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json,./coverage/coverage-final.json
198+ flags : version-alpine-success
132199 name : codecov-version
133200 version : v9.1.0
134201 verbose : true
135202 token : ${{ secrets.CODECOV_TOKEN }}
203+
204+ run-alpine-partial-deps :
205+ runs-on : ubuntu-latest
206+ container : alpine:latest
207+ steps :
208+ - name : Install only some deps (missing gpg and bash)
209+ run : |
210+ apk add git curl
211+ - name : Checkout
212+ 213+ with :
214+ submodules : " true"
215+ - name : Upload coverage to Codecov (should fail due to missing gpg and bash)
216+ id : codecov-upload
217+ continue-on-error : true
218+ uses : ./
219+ with :
220+ files : ./coverage/script/coverage-final.json
221+ flags : script-alpine-partial-deps
222+ name : codecov-script
223+ verbose : true
224+ token : ${{ secrets.CODECOV_TOKEN }}
225+ - name : Verify dependency check failed
226+ run : |
227+ if [ "${{ steps.codecov-upload.outcome }}" = "failure" ]; then
228+ echo "✓ Action correctly failed due to missing dependencies (gpg and bash)"
229+ exit 0
230+ else
231+ echo "✗ Action should have failed but didn't"
232+ exit 1
233+ fi
0 commit comments