diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 942cb38b82b55..ef73ff7ee733c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -34,40 +34,27 @@ jobs: runs-on: ubuntu-latest name: Cypress / Component Testing steps: - - uses: actions/checkout@v4.2.0 - uses: actions/checkout@v4.2.0 with: ref: ${{ github.base_ref }} - path: ${{ env.CYPRESS_BASELINE_REPO }} - uses: taiga-family/ci/actions/setup/variables@v1.93.0 - uses: taiga-family/ci/actions/setup/node@v1.93.0 - id: node - - - name: Restore cache for baseline - uses: actions/cache/restore@v4.0.2 - 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/checkout@v4.2.0 + - uses: taiga-family/ci/actions/setup/variables@v1.93.0 + - uses: taiga-family/ci/actions/setup/node@v1.93.0 - 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: |