Skip to content

Commit

Permalink
chore: experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov committed Oct 3, 2024
1 parent 4a75009 commit 523bd17
Showing 1 changed file with 9 additions and 23 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,40 +34,26 @@ 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 -not -path "**/demo-cypress/**/snapshots/baseline" -not -path "**/demo-cypress/**/snapshots/baseline/**" -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: |
Expand Down

0 comments on commit 523bd17

Please sign in to comment.