Feature/playwright #43
@@ -50,14 +50,6 @@ jobs:
|
|||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: yarn test:component --reporter=verbose --logHeapUsage
|
run: yarn test:component --reporter=verbose --logHeapUsage
|
||||||
|
|
||||||
- name: Upload Build Artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: svelte-static-dist
|
|
||||||
path: |
|
|
||||||
.
|
|
||||||
!node_modules/
|
|
||||||
|
|
||||||
e2e:
|
e2e:
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -65,42 +57,27 @@ jobs:
|
|||||||
image: mcr.microsoft.com/playwright:v1.59.0-jammy
|
image: mcr.microsoft.com/playwright:v1.59.0-jammy
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Enable Corepack
|
- name: Enable Corepack
|
||||||
run: |
|
run: |
|
||||||
corepack enable
|
corepack enable
|
||||||
corepack prepare yarn@stable --activate
|
corepack prepare yarn@stable --activate
|
||||||
|
|
||||||
- name: Persistent Yarn Cache
|
- name: Persistent Yarn Cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: .yarn/cache
|
path: .yarn/cache
|
||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: ${{ runner.os }}-yarn-
|
restore-keys: ${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn install --immutable
|
run: yarn install --immutable
|
||||||
|
- name: Build Svelte SPA
|
||||||
# Pull down the compiled dist folder so Vite can preview it
|
run: yarn build
|
||||||
- name: Download Build Artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: svelte-static-dist
|
|
||||||
|
|
||||||
- name: E2E Tests
|
- name: E2E Tests
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
run: yarn test:e2e
|
run: yarn test:e2e
|
||||||
|
|
||||||
- name: Upload Playwright report
|
|
||||||
if: failure()
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: playwright-report
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: build # Only runs if tests/lint pass
|
# Runs if lint, unit-, component-, e2e-tests pass
|
||||||
|
needs: [build, e2e]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/main' # Only deploy from main branch
|
if: github.ref == 'refs/heads/main' # Only deploy from main branch
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user