Skip to content

Commit 1451176

Browse files
add test-artifacts.yaml
1 parent d23e46c commit 1451176

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Upload Test Artifacts
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Browser tests"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
upload-test-artifacts:
11+
runs-on: ubuntu-latest
12+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
13+
steps:
14+
- name: Download artifact
15+
uses: dawidd6/action-download-artifact@v3
16+
with:
17+
workflow: browser-tests.yaml
18+
run_id: ${{ github.event.workflow_run.id }}
19+
path: artifacts
20+
21+
- name: Upload screenshots from failed tests
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: failed-test-screenshots
25+
path: artifacts/**/build/project/behat-output/*.png
26+
if-no-files-found: ignore
27+
retention-days: 14

0 commit comments

Comments
 (0)