Skip to content

Commit

Permalink
Merge pull request #291 from kabalin/faildump
Browse files Browse the repository at this point in the history
Add step for Behat faildump storing as GHA artifact.
  • Loading branch information
kabalin authored Mar 16, 2024
2 parents b9786ea + 5e7efd1 commit 144700a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com).

## [Unreleased]

- Added GHA step to store Behat faildump as workflow artefact, so it can be
[inspected](https://docs.github.com/en/actions/managing-workflow-runs/downloading-workflow-artifacts). Documentation has been updated as well to reflect the purpose of the step.

## [4.4.1] - 2024-03-08
### Added
- New `--no-plugin-node` option added to the `install` command, to be able to skip the installation of any NodeJS stuff that the plugin may include. The previous default has not changed and both Moodle's and plugin's NodeJS installation continues happening normally.
Expand Down
13 changes: 13 additions & 0 deletions docs/GHAFileExplained.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,22 @@ jobs:
run: moodle-plugin-ci phpunit

- name: Behat features
id: behat
if: ${{ !cancelled() }}
run: moodle-plugin-ci behat --profile chrome

# This step allows to upload Behat faildump (screenshots) as workflow artifact
# so it can be downloaded and inspected. You don't need this step if you
# are not running Behat test. Artifact will be retained for 7 days.
- name: Upload Behat Faildump
if: ${{ failure() && steps.behat.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: Behat Faildump (${{ join(matrix.*, ', ') }})
path: ${{ github.workspace }}/moodledata/behat_dump
retention-days: 7
if-no-files-found: ignore

- name: Mark cancelled jobs as failed.
if: ${{ cancelled() }}
run: exit 1
Expand Down
10 changes: 10 additions & 0 deletions gha.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,19 @@ jobs:
run: moodle-plugin-ci phpunit --fail-on-warning

- name: Behat features
id: behat
if: ${{ !cancelled() }}
run: moodle-plugin-ci behat --profile chrome

- name: Upload Behat Faildump
if: ${{ failure() && steps.behat.outcome == 'failure' }}
uses: actions/upload-artifact@v4
with:
name: Behat Faildump (${{ join(matrix.*, ', ') }})
path: ${{ github.workspace }}/moodledata/behat_dump
retention-days: 7
if-no-files-found: ignore

- name: Mark cancelled jobs as failed.
if: ${{ cancelled() }}
run: exit 1

0 comments on commit 144700a

Please sign in to comment.