Fix use package version from imported json instead of direct import #2862
Workflow file for this run
This file contains hidden or 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
| name: Widget Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| - staging | |
| jobs: | |
| e2e-test: | |
| timeout-minutes: 20 | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.52.0-noble | |
| options: --user 1001 | |
| ports: | |
| - 5173:5173 | |
| env: | |
| PLAYWRIGHT_BROWSERS_PATH: ~/.cache/ms-playwright | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| cache: 'yarn' | |
| cache-dependency-path: yarn.lock | |
| - name: Cache Playwright browsers | |
| id: playwright-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-playwright- | |
| - name: Install dependencies | |
| run: YARN_ENABLE_SCRIPTS=false yarn install --immutable | |
| - name: Playwright install | |
| working-directory: ./packages/widget | |
| if: steps.playwright-cache.outputs.cache-hit != 'true' | |
| run: yarn playwright install | |
| - name: build client lib | |
| run: yarn run build:client | |
| - name: Run e2e tests | |
| env: | |
| WORD_PHRASE_KEY: ${{ secrets.WORD_PHRASE_KEY }} | |
| run: yarn test-widget | |
| - name: Generate combined image and diff | |
| if: always() | |
| run: | | |
| yarn combine-images | |
| working-directory: ./packages/widget | |
| - name: Upload screenshots | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: widget-screenshots | |
| path: | | |
| packages/widget/__tests__/Widget |