diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 896ee216..1b31a3b8 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -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. diff --git a/docs/GHAFileExplained.md b/docs/GHAFileExplained.md index aca304a5..fc358a51 100644 --- a/docs/GHAFileExplained.md +++ b/docs/GHAFileExplained.md @@ -181,9 +181,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 diff --git a/gha.dist.yml b/gha.dist.yml index 960b2944..143a4ccf 100644 --- a/gha.dist.yml +++ b/gha.dist.yml @@ -109,9 +109,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