Xqt submitted this change.

View Change

Approvals: jenkins-bot: Verified Xqt: Looks good to me, approved
[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(-)

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

To view, visit change 768759. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Change-Id: Ib2fc2cf5091fe17204d83921371b672dd352b640
Gerrit-Change-Number: 768759
Gerrit-PatchSet: 1
Gerrit-Owner: Xqt <info@gno.de>
Gerrit-Reviewer: Xqt <info@gno.de>
Gerrit-Reviewer: jenkins-bot
Gerrit-MessageType: merged