Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 36 additions & 36 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,39 +118,39 @@ jobs:
.svelte-kit
key: build-cache-${{ github.sha }}

- name: Get Playwright version
id: playwright-version
run: |
PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test | grep @playwright | sed 's/.*@//' | sed 's/\//-/g' | sed 's/ /-/g')
echo "Playwright version: $PLAYWRIGHT_VERSION"
echo "version=$PLAYWRIGHT_VERSION" >> ${GITHUB_OUTPUT}

- name: Cache Playwright browsers
id: cache-playwright-browsers
uses: actions/cache@v3
with:
path: ~/.cache/ms-playwright
key: playwright-browsers-${{ steps.playwright-version.outputs.version }}

- name: Setup Playwright (cache miss)
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
run: npx playwright install --with-deps

- name: Setup Playwright (cache hit)
if: steps.cache-playwright-browsers.outputs.cache-hit == 'true'
run: npx playwright install

- name: Run end-to-end tests
run: npx percy exec -- playwright test

- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: ${{ vars.SNAPSHOT_TRIGGER_LABEL }}

- name: Upload Playwright trace
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-results
path: test-results/
retention-days: 7
# - name: Get Playwright version
# id: playwright-version
# run: |
# PLAYWRIGHT_VERSION=$(pnpm ls @playwright/test | grep @playwright | sed 's/.*@//' | sed 's/\//-/g' | sed 's/ /-/g')
# echo "Playwright version: $PLAYWRIGHT_VERSION"
# echo "version=$PLAYWRIGHT_VERSION" >> ${GITHUB_OUTPUT}

# - name: Cache Playwright browsers
# id: cache-playwright-browsers
# uses: actions/cache@v3
# with:
# path: ~/.cache/ms-playwright
# key: playwright-browsers-${{ steps.playwright-version.outputs.version }}

# - name: Setup Playwright (cache miss)
# if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
# run: npx playwright install --with-deps

# - name: Setup Playwright (cache hit)
# if: steps.cache-playwright-browsers.outputs.cache-hit == 'true'
# run: npx playwright install

# - name: Run end-to-end tests
# run: npx percy exec -- playwright test

# - uses: actions-ecosystem/action-remove-labels@v1
# with:
# labels: ${{ vars.SNAPSHOT_TRIGGER_LABEL }}

# - name: Upload Playwright trace
# uses: actions/upload-artifact@v4
# if: failure()
# with:
# name: test-results
# path: test-results/
# retention-days: 7
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const config: PlaywrightTestConfig = {
},
webServer: [
{
command: `pnpm dev --port=${port}`,
command: `pnpm run hash-pem && pnpm exec vite dev --port=${port}`,
port,
reuseExistingServer: !process.env.CI,
},
Expand Down
Loading