Skip to content

Commit

Permalink
Fix merging in demos tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexslavr committed Jan 21, 2025
1 parent 2e3f274 commit edfcaf1
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/demos_visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,44 @@ jobs:
echo "::warning ::$message"
fi
- name: Sanitize job name
if: ${{ failure() }}
run: echo "JOB_NAME=$(echo "${{ matrix.ARGS.name }}" | tr '/' '-')" >> $GITHUB_ENV

- name: Copy screenshots artifacts
if: failure() && matrix.STRATEGY == 'screenshots'
uses: actions/upload-artifact@v4
with:
name: screenshots
name: screenshots-${{ env.JOB_NAME }}
path: ${{ github.workspace }}/apps/demos/testing/artifacts/compared-screenshots/**/*
if-no-files-found: ignore

- name: Copy accessibility report
if: matrix.STRATEGY == 'accessibility'
uses: actions/upload-artifact@v4
with:
name: accessibility-reports
name: accessibility-reports-${{ env.JOB_NAME }}
path: apps/demos/testing/artifacts/axe-reports/*
if-no-files-found: ignore

merge:
runs-on: devextreme-shr2
needs: testcafe
if: contains(needs.*.result, 'failure')

steps:
- name: Merge screenshot artifacts
uses: actions/upload-artifact/merge@v4
continue-on-error: true
with:
name: screenshots
pattern: screenshots-*
delete-merged: true

- name: Merge accessibility reports
uses: actions/upload-artifact/merge@v4
continue-on-error: true
with:
name: accessibility-reports
pattern: accessibility-reports-*
delete-merged: true
20 changes: 19 additions & 1 deletion .github/workflows/demos_visual_tests_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,28 @@ jobs:
CI_ENV: true # The `ignore` field in the visualtestrc.json should be disabled when running test locally
run: npx nx test-testcafe

- name: Sanitize job name
if: ${{ failure() }}
run: echo "JOB_NAME=$(echo "${{ matrix.ARGS.name }}" | tr '/' '-')" >> $GITHUB_ENV

- name: Copy screenshots artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: screenshots
name: screenshots-${{ env.JOB_NAME }}
path: ${{ github.workspace }}/apps/demos/testing/artifacts/compared-screenshots/**/*
if-no-files-found: ignore

merge:
runs-on: devextreme-shr2
needs: testcafe
if: contains(needs.*.result, 'failure')

steps:
- name: Merge screenshot artifacts
uses: actions/upload-artifact/merge@v4
continue-on-error: true
with:
name: screenshots
pattern: screenshots-*
delete-merged: true

0 comments on commit edfcaf1

Please sign in to comment.