Skip to content

Commit

Permalink
Check if subfolders of test-results has files (#1097)
Browse files Browse the repository at this point in the history
* ci: check if subfolders of test-results has files

* ci: try new approach
  • Loading branch information
aaschlote authored Aug 19, 2024
1 parent 6e75592 commit 3466560
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ on:
BASE_URL:
required: false

env:
files_exis_subfolder_test_results: "false"

jobs:
e2e-tests:
strategy:
Expand Down Expand Up @@ -69,8 +72,18 @@ jobs:
path: blob-report/*.zip
retention-days: 1

- name: Check for files in subfolders of test-results
id: check_subfolders
run: |
# Check if there are any files in subdirectories of test-results
if find test-results -type f -mindepth 2 | grep -q .; then
echo "files_exis_subfolder_test_results=true" >> $GITHUB_ENV
else
echo "files_exis_subfolder_test_results=false" >> $GITHUB_ENV
fi
- name: Upload Failed Test results
if: ${{ hashFiles('test-results/') != '' }}
if: ${{ env.files_exis_subfolder_test_results == 'true' }}
uses: actions/upload-artifact@v4
with:
name: video-test-results-${{ inputs.e2e-target }}-${{ matrix.shard }}
Expand Down

0 comments on commit 3466560

Please sign in to comment.