-
Notifications
You must be signed in to change notification settings - Fork 471
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
4a75009
commit ce7c304
Showing
1 changed file
with
10 additions
and
23 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 |
---|---|---|
|
@@ -34,40 +34,27 @@ jobs: | |
runs-on: ubuntu-latest | ||
name: Cypress / Component Testing | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
ref: ${{ github.base_ref }} | ||
path: ${{ env.CYPRESS_BASELINE_REPO }} | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
id: node | ||
|
||
- name: Restore cache for baseline | ||
uses: actions/cache/[email protected] | ||
id: baseline_cache | ||
with: | ||
path: ${{ env.CYPRESS_BASELINE_REPO }}/node_modules | ||
# TODO: replace with ${{ steps.node.outputs.node-version }} | ||
key: | ||
"${{ runner.os }}-node-20.x__${{ hashFiles(format('{0}/package-lock.json', env.CYPRESS_BASELINE_REPO)) }}" | ||
|
||
- name: Install dependencies for baseline state | ||
if: steps.baseline_cache.outputs.cache-hit != 'true' | ||
run: cd ${{ env.CYPRESS_BASELINE_REPO }} && npm i --workspaces --include-workspace-root | ||
|
||
- name: Run tests for baseline state | ||
run: | | ||
tree -d -L 1 | ||
tree -d ${{ env.CYPRESS_BASELINE_REPO }} -L 1 | ||
cd ${{ env.CYPRESS_BASELINE_REPO }} | ||
npx nx component-test demo-cypress | ||
cd ../ | ||
mkdir -p ${{ env.CYPRESS_BASELINE_SNAPSHOTS }} && cp -r ${{ env.CYPRESS_BASELINE_REPO }}/${{env.CYPRESS_BASELINE_SNAPSHOTS }}/. ${{ env.CYPRESS_BASELINE_SNAPSHOTS }} | ||
rm -r ${{ env.CYPRESS_BASELINE_REPO }} | ||
find . -mindepth 1 -type f -not -path "**/demo-cypress/**/snapshots/baseline/**" -delete | ||
find . -type d -empty -delete | ||
tree . | ||
- uses: actions/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
- uses: taiga-family/ci/actions/setup/[email protected] | ||
|
||
- name: Run tests for current state | ||
run: npx nx component-test demo-cypress | ||
run: | | ||
tree ${{env.CYPRESS_BASELINE_SNAPSHOTS}} | ||
npx nx component-test demo-cypress | ||
- name: Prepare diff screenshots | ||
run: | | ||
|