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 4048dd7 commit 9e68f8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/demos_visual_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,26 +151,31 @@ jobs:
message=$(cat $ACCESSIBILITY_TESTCAFE_REPORT_PATH)
echo "::warning ::$message"
- name: Sanitize job name
if: ${{ failure() }}
run: echo "JOB_NAME=$(echo "${{ matrix.CONSTEL }}-${{ matrix.THEME }}" | tr '/' '-')" >> $GITHUB_ENV

- name: Copy screenshots artifacts
if: failure() && matrix.STRATEGY == 'screenshots'
uses: actions/upload-artifact@v4
with:
name: screenshots-${{ matrix.CONSTEL }}-${{ matrix.THEME }}
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-${{ matrix.CONSTEL }}-${{ matrix.THEME }}
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
Expand All @@ -186,4 +191,4 @@ jobs:
with:
name: accessibility-reports
pattern: accessibility-reports-*
delete-merged: true
delete-merged: true
8 changes: 7 additions & 1 deletion .github/workflows/demos_visual_tests_frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -463,17 +463,23 @@ jobs:
CI_ENV: true # The `ignore` field in the visualtestrc.json should be disabled when running test locally
run: pnpx nx test-testcafe

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

- name: Copy screenshots artifacts
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: screenshots-${{ matrix.CONSTEL }}-${{ matrix.THEME }}
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
Expand Down

0 comments on commit 9e68f8b

Please sign in to comment.