moodlehq / moodle-plugin-ci

Helps running Moodle plugins analysis checks and tests under various CI environments.
https://moodlehq.github.io/moodle-plugin-ci/
GNU General Public License v3.0
41 stars 43 forks source link

Add step for Behat faildump storing as GHA artifact. #291

Closed kabalin closed 4 months ago

kabalin commented 4 months ago

Add GHA step to store Behat faildump as workflow artifact, so it can be inspected.

image

This step will be run only if Behat step failed (see if statement). It also configured not to produce warning if files are not found (the cause of Behat error might be not the actual test scenario). Name is derived from the job matrix, it needs to be unique per job when matrix is used (artifact upload will fail on name conflict if more than 1 job will fail on Behat)

Demo (simplified for speed):

More info on upload artifact: https://github.com/actions/upload-artifact

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.04%. Comparing base (7b22048) to head (5e7efd1). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #291 +/- ## ========================================= Coverage 88.04% 88.04% Complexity 731 731 ========================================= Files 75 75 Lines 2234 2234 ========================================= Hits 1967 1967 Misses 267 267 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kabalin commented 3 months ago

BTW, kudos also go to @marinaglancy who suggested the similar idea for our internal GitLab jobs 🎉