Skip to content

Commit 49c1e5e

Browse files
authored
ci: avoid upload failures with unique screenshot names with optional suffixes (#5404)
* ci: avoid upload failures with unique screenshot names with optional suffixes * Fix typo * Use fastlane command as part of the name
1 parent b177819 commit 49c1e5e

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

.github/actions/capture-screenshot/action.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: "Capture screenshot"
22
description: "Captures a screenshot of the machine"
3+
inputs:
4+
suffix:
5+
description: "The suffix of the screenshot"
6+
required: false
7+
default: ""
38
runs:
49
using: "composite"
510
steps:
@@ -10,5 +15,5 @@ runs:
1015
- name: Store screenshot
1116
uses: actions/upload-artifact@v4
1217
with:
13-
name: screenshot-${{ github.job }}
18+
name: screenshot-${{ github.job }}${{ inputs.suffix }}
1419
path: /tmp/screenshot.png

.github/workflows/ui-tests-common.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ on:
1212
required: false
1313
default: ""
1414
type: string
15-
xcresult_suffix:
16-
description: "Suffix for the xcresult artifact (if needed)"
15+
files_suffix:
16+
description: "Suffix for the files to upload"
1717
required: false
1818
default: ""
1919
type: string
@@ -95,18 +95,20 @@ jobs:
9595
uses: actions/upload-artifact@v4
9696
if: ${{ failure() }}
9797
with:
98-
name: ${{ inputs.fastlane_command }}${{inputs.xcresult_suffix}}
98+
name: ${{ inputs.fastlane_command }}${{ inputs.files_suffix }}.xcresult
9999
path: fastlane/test_results/${{ inputs.fastlane_command }}.xcresult
100100

101101
- name: Archiving Raw Test Logs
102102
uses: actions/upload-artifact@v4
103103
if: ${{ failure() || cancelled() }}
104104
with:
105-
name: ${{ inputs.fastlane_command }}${{inputs.xcresult_suffix}}_raw_output
105+
name: ${{ inputs.fastlane_command }}${{ inputs.files_suffix }}_raw_output
106106
path: |
107107
~/Library/Logs/scan/*.log
108108
./fastlane/test_output/**
109109
110110
- name: Store screenshot
111111
uses: ./.github/actions/capture-screenshot
112112
if: failure()
113+
with:
114+
suffix: ${{ inputs.fastlane_command }}${{ inputs.files_suffix }}

.github/workflows/ui-tests-critical.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
build_with_make: true
3131
xcode_version: ${{matrix.platform.xcode}}
3232
macos_version: ${{matrix.platform.runs-on}}
33+
files_suffix: _${{matrix.platform.xcode}}
3334
strategy:
3435
fail-fast: false
3536
matrix:

.github/workflows/ui-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
fastlane_command: ui_tests_ios_swift
7171
fastlane_command_extra_arguments: device:"${{matrix.device}}"
72-
xcresult_suffix: _xcode_${{matrix.xcode}}-${{matrix.device}}
72+
files_suffix: _xcode_${{matrix.xcode}}-${{matrix.device}}
7373
xcode_version: ${{matrix.xcode}}
7474
build_with_make: true
7575
macos_version: ${{matrix.runs-on}}

0 commit comments

Comments
 (0)