-
Notifications
You must be signed in to change notification settings - Fork 472
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e5afd7
commit 579c7e0
Showing
1 changed file
with
19 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: | ||
|
@@ -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: | | ||
|