Xqt has submitted this change. ( https://gerrit.wikimedia.org/r/c/pywikibot/core/+/768759 )
Change subject: [tests] Upload coverage file even if tests fails ......................................................................
[tests] Upload coverage file even if tests fails
- continue CI test run on error - run codecov to upload coverage file - exit 1 on failure finally if CI test failed
Change-Id: Ib2fc2cf5091fe17204d83921371b672dd352b640 --- M .github/workflows/pywikibot-ci.yml 1 file changed, 6 insertions(+), 1 deletion(-)
Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
diff --git a/.github/workflows/pywikibot-ci.yml b/.github/workflows/pywikibot-ci.yml index d814284..37d8f6c 100644 --- a/.github/workflows/pywikibot-ci.yml +++ b/.github/workflows/pywikibot-ci.yml @@ -111,6 +111,8 @@ echo "('${{ env.PYWIKIBOT_USERNAME }}', '${{ secrets.PYWIKIBOT_USERPWD }}')" > passwordfile
- name: Test with unittest or pytest + id: ci_test + continue-on-error: true env: PYWIKIBOT_TEST_NO_RC: ${{ (matrix.site == 'wikisource:zh' || matrix.test_no_rc) && 1 || 0 }} @@ -125,5 +127,8 @@ fi
- name: Upload coverage to Codecov - continue-on-error: true run: codecov + + - name: Check on failure + if steps.ci_test.outcome == 'failure' + run exit 1
pywikibot-commits@lists.wikimedia.org