ci: upload cypress recordings on failure (#35031)

This commit is contained in:
Raffael Meyer 2025-12-02 23:57:00 +01:00 committed by GitHub
parent e61b207372
commit 93aabafca3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -103,6 +103,7 @@ jobs:
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
- name: Run Tests - name: Run Tests
id: ui-tests
run: | run: |
source ${GITHUB_WORKSPACE}/env/bin/activate source ${GITHUB_WORKSPACE}/env/bin/activate
bench --site test_site \ bench --site test_site \
@ -129,11 +130,13 @@ jobs:
name: coverage-js-${{ matrix.index }} name: coverage-js-${{ matrix.index }}
path: ./apps/${{ github.event.repository.name }}/.cypress-coverage/clover.xml path: ./apps/${{ github.event.repository.name }}/.cypress-coverage/clover.xml
- name: Compress Cypress Videos - name: Compress Cypress Videos
if: steps.ui-tests.outcome == 'failure'
run: | run: |
if find ./cypressVideos -mindepth 1 | read; then if find ./cypressVideos -mindepth 1 | read; then
zip -r cypress_recordings.zip ./cypressVideos zip -r cypress_recordings.zip ./cypressVideos
fi fi
- name: Upload Cypress Videos - name: Upload Cypress Videos
if: steps.ui-tests.outcome == 'failure'
uses: actions/upload-artifact@v5 uses: actions/upload-artifact@v5
with: with:
name: Cypress CI Video Recordings name: Cypress CI Video Recordings