Skip to content

Commit 1ccbfe9

Browse files
committed
MOBILE-4254 ci: Upload behat faildumps artifacts
1 parent 230b4b6 commit 1ccbfe9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/acceptance.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
git clone --branch master --depth 1 https://github.com/moodlehq/moodle-docker $GITHUB_WORKSPACE/moodle-docker
4343
- name: Install npm packages
4444
run: npm ci --no-audit
45+
- name: Create Behat faildumps folder
46+
run: |
47+
mkdir moodle/behatfaildumps
48+
chmod 777 moodle/behatfaildumps
4549
- name: Install Behat Snapshots plugin
4650
run: git clone --branch main --depth 1 https://github.com/NoelDeMartin/moodle-local_behatsnapshots $GITHUB_WORKSPACE/moodle/local/behatsnapshots
4751
- name: Generate Behat tests plugin
@@ -52,6 +56,7 @@ jobs:
5256
run: |
5357
export MOODLE_DOCKER_WWWROOT=$GITHUB_WORKSPACE/moodle
5458
cp $GITHUB_WORKSPACE/moodle-docker/config.docker-template.php $GITHUB_WORKSPACE/moodle/config.php
59+
sed -i "61c\$CFG->behat_faildump_path = '/var/www/html/behatfaildumps';" $GITHUB_WORKSPACE/moodle/config.php
5560
sed -i "61i\$CFG->behat_increasetimeout = 2;" $GITHUB_WORKSPACE/moodle/config.php
5661
sed -i "61i\$CFG->behat_ionic_wwwroot = 'http://moodleapp';" $GITHUB_WORKSPACE/moodle/config.php
5762
sed -i "61i\$CFG->behat_snapshots_path = '/var/www/html/local/moodleappbehat/tests/behat/snapshots';" $GITHUB_WORKSPACE/moodle/config.php
@@ -86,3 +91,9 @@ jobs:
8691
with:
8792
name: snapshot_failures
8893
path: moodle/local/moodleappbehat/tests/behat/snapshots/failures/*
94+
- name: Upload Behat failures
95+
uses: actions/upload-artifact@v3
96+
if: ${{ failure() }}
97+
with:
98+
name: behat_failures
99+
path: moodle/behatfaildumps

0 commit comments

Comments
 (0)