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 3, 2024
1 parent 6e5afd7 commit 579c7e0
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 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_${{ CI_COMMIT_SHA }}'

jobs:
build-demo:
Expand Down Expand Up @@ -41,24 +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
cp -r ${{env.CYPRESS_BASELINE_SNAPSHOTS }}/. temp-storage
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 . -L 1
npx nx component-test demo-cypress
run: npx nx component-test demo-cypress

- name: Prepare diff screenshots
run: |
Expand Down

0 comments on commit 579c7e0

Please sign in to comment.