Skip to content

Commit 5d3256c

Browse files
fix spec duplication and failure video path (#2640)
1 parent 58cc0bf commit 5d3256c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/test-e2e-cypress.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
run: |
4444
changed_files=$(git diff --name-only --diff-filter=ADMR ${{ github.event.before }} origin/master)
4545
spec_list=()
46+
declare -A spec_seen
4647
4748
for line in $changed_files; do
4849
if [[ "$line" =~ src/(blocks|extensions|components|block-styles).* ]]; then # If changed file is within our tested paths.
@@ -59,7 +60,10 @@ jobs:
5960
spec=$(echo $spec | sed 's:.*/::')
6061
6162
# Build spec list for cypress run.
62-
spec_list+="'${spec}',"
63+
if [[ -z "${spec_seen[$spec]}" ]]; then
64+
spec_list+="'${spec}',"
65+
spec_seen[$spec]=1
66+
fi
6367
6468
fi
6569
done
@@ -177,11 +181,10 @@ jobs:
177181
if: ${{ failure() }}
178182
uses: actions/upload-artifact@v4
179183
with:
180-
name: ${{ matrix.spec }}-fail.mp4
184+
name: ${{ matrix.spec }}-wp${{ env.WP_CORE_VERSION }}-php${{ inputs.phpVersion }}-fail.mp4
181185
path: ./.dev/tests/cypress/videos/${{ matrix.spec }}.mp4
182186
retention-days: 1
183187

184-
185188
test_cypress_e2e_full:
186189
if: github.event_name == 'push'
187190
needs: setup-matrix
@@ -326,7 +329,8 @@ jobs:
326329
if: ${{ failure() }}
327330
uses: actions/upload-artifact@v4
328331
with:
329-
name: ${{ matrix.spec }}-fail.mp4
332+
name: ${{ matrix.spec }}-wp${{ env.WP_CORE_VERSION }}-php${{ inputs.phpVersion }}-fail.mp4
330333
path: ./.dev/tests/cypress/videos/${{ matrix.spec }}.mp4
331334
retention-days: 1
335+
332336

0 commit comments

Comments
 (0)