diff --git a/.github/screenshot-bot.config.toml b/.github/screenshot-bot.config.toml
index 8b0465027d644..63258542591cf 100644
--- a/.github/screenshot-bot.config.toml
+++ b/.github/screenshot-bot.config.toml
@@ -22,4 +22,4 @@ branchesIgnore = ["^release/.*", "^v[0-9].x$"]
screenshotImageAttrs = []
# Text which is placed at the beginning of section "Failed tests"
-failedTestsReportDescription = '### Before (main) <= Diff => After (local)'
+failedTestsReportDescription = '
Before (main) ← Diff → After (local)
'
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index 4d4d66214c055..38666534dbf19 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -6,6 +6,7 @@ env:
CYPRESS_BASELINE_REPO: 'baseline'
CYPRESS_RESULTS_FOLDER: 'projects/demo-cypress/tests-results'
CYPRESS_BASELINE_SNAPSHOTS: 'projects/demo-cypress/tests-results/snapshots/baseline'
+ CYPRESS_BASELINE_SNAPSHOTS_KEY: 'cy_baseline_${{ github.event.pull_request.head.sha }}'
jobs:
build-demo:
@@ -41,23 +42,30 @@ jobs:
- uses: taiga-family/ci/actions/setup/node@v1.93.0
- name: Run tests for baseline state
- run: |
- npx nx component-test demo-cypress
- rm -r node_modules
- find . -mindepth 1 -type f -not -path "**/demo-cypress/**/snapshots/baseline/**" -delete
- find . -type d -empty -delete
- tree .
+ run: npx nx component-test demo-cypress
- - uses: actions/checkout@v4.2.0
+ - name: Save Cypress Baseline Snapshots
+ uses: actions/upload-artifact@v4.4.0
with:
- clean: false
+ path: ${{env.CYPRESS_BASELINE_SNAPSHOTS}}
+ name: ${{env.CYPRESS_BASELINE_SNAPSHOTS_KEY}}
+ if-no-files-found: ignore
+ compression-level: 0
+ retention-days: 1
+
+ - uses: actions/checkout@v4.2.0
- uses: taiga-family/ci/actions/setup/variables@v1.93.0
- uses: taiga-family/ci/actions/setup/node@v1.93.0
+ - name: Download Cypress Baseline Snapshots
+ uses: actions/download-artifact@v4.1.8
+ with:
+ path: ${{env.CYPRESS_BASELINE_SNAPSHOTS}}
+ pattern: ${{ env.CYPRESS_BASELINE_SNAPSHOTS_KEY }}
+ merge-multiple: true
+
- name: Run tests for current state
- run: |
- tree ${{env.CYPRESS_BASELINE_SNAPSHOTS}}
- npx nx component-test demo-cypress
+ run: npx nx component-test demo-cypress
- name: Prepare diff screenshots
run: |