diff --git a/.github/workflows/demos_visual_tests.yml b/.github/workflows/demos_visual_tests.yml index c71e777601a3..306c581089d0 100644 --- a/.github/workflows/demos_visual_tests.yml +++ b/.github/workflows/demos_visual_tests.yml @@ -151,11 +151,15 @@ 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 @@ -163,14 +167,15 @@ jobs: 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 @@ -186,4 +191,4 @@ jobs: with: name: accessibility-reports pattern: accessibility-reports-* - delete-merged: true \ No newline at end of file + delete-merged: true diff --git a/.github/workflows/demos_visual_tests_frameworks.yml b/.github/workflows/demos_visual_tests_frameworks.yml index 0ef182a5c070..9a3e5db74d84 100644 --- a/.github/workflows/demos_visual_tests_frameworks.yml +++ b/.github/workflows/demos_visual_tests_frameworks.yml @@ -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