Skip to content

Commit

Permalink
chore: another experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Oct 4, 2024
1 parent 703f01e commit 9aaf191
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/screenshot-bot.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<h3 align="center">Before (main) Diff After (local)</h3>'
30 changes: 19 additions & 11 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -41,23 +42,30 @@ jobs:
- uses: taiga-family/ci/actions/setup/[email protected]

- 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/[email protected]
- name: Save Cypress Baseline Snapshots
uses: actions/[email protected]
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/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]

- name: Download Cypress Baseline Snapshots
uses: actions/[email protected]
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: |
Expand Down

0 comments on commit 9aaf191

Please sign in to comment.