8585 uses : codecov/codecov-action@v3
8686 with :
8787 directory : empty
88- token : 87cefb17-c44b-4f2f-8b30-1fff5769ce46
8988 name : Windows (${{ matrix.python }}, ${{ matrix.arch }}${{ matrix.extra_name }})
89+ # multiple flags is marked as an error in codecov UI, but is actually fine
90+ # https://github.com/codecov/feedback/issues/567
9091 flags : Windows,${{ matrix.python }}
92+ # this option cannot be set in .codecov.yml
93+ fail_ci_if_error : true
9194
9295 Ubuntu :
9396 name : ' Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})'
@@ -131,13 +134,15 @@ jobs:
131134 env :
132135 CHECK_FORMATTING : ' ${{ matrix.check_formatting }}'
133136 NO_TEST_REQUIREMENTS : ' ${{ matrix.no_test_requirements }}'
134- - if : always()
137+ - if : >-
138+ always()
139+ && matrix.check_formatting != '1'
135140 uses: codecov/codecov-action@v3
136141 with:
137142 directory: empty
138- token : 87cefb17-c44b-4f2f-8b30-1fff5769ce46
139143 name: Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})
140144 flags: Ubuntu,${{ matrix.python }}
145+ fail_ci_if_error: true
141146
142147 macOS :
143148 name : ' macOS (${{ matrix.python }})'
@@ -171,9 +176,9 @@ jobs:
171176 uses : codecov/codecov-action@v3
172177 with :
173178 directory : empty
174- token : 87cefb17-c44b-4f2f-8b30-1fff5769ce46
175179 name : macOS (${{ matrix.python }})
176180 flags : macOS,${{ matrix.python }}
181+ fail_ci_if_error : true
177182
178183 # run CI on a musl linux
179184 Alpine :
@@ -193,13 +198,16 @@ jobs:
193198 run : python -m venv .venv
194199 - name : Run tests
195200 run : source .venv/bin/activate && ./ci.sh
201+ - name : Get Python version for codecov flag
202+ id : get-version
203+ run : echo "version=$(python -V | cut -d' ' -f2 | cut -d'.' -f1,2)" >> "${GITHUB_OUTPUT}"
196204 - if : always()
197205 uses : codecov/codecov-action@v3
198206 with :
199207 directory : empty
200- token : 87cefb17-c44b-4f2f-8b30-1fff5769ce46
201208 name : Alpine
202- flags : Alpine,3.12
209+ flags : Alpine,${{ steps.get-version.outputs.version }}
210+ fail_ci_if_error : true
203211
204212 Cython :
205213 name : " Cython"
0 commit comments