Skip to content

Commit bb8a0c5

Browse files
committed
chore: enable web e2e on ci
1 parent 77d0ee6 commit bb8a0c5

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
- 'apps/example-web/package.json'
5353
- 'apps/example-web/vite.config.ts'
5454
- 'apps/example-web/index.html'
55+
- '.playwright/**'
5556
5657
lint:
5758
runs-on: ubuntu-latest
@@ -86,6 +87,39 @@ jobs:
8687
- name: Run unit tests
8788
run: yarn test --maxWorkers=2 --coverage
8889

90+
test-e2e-web:
91+
needs: [changes]
92+
if: needs.changes.outputs.web == 'true'
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Checkout
96+
uses: actions/checkout@v4
97+
98+
- name: Setup
99+
uses: ./.github/actions/setup
100+
101+
- name: Cache Playwright browsers
102+
uses: actions/cache@v4
103+
with:
104+
path: ~/.cache/ms-playwright
105+
key: ${{ runner.os }}-playwright-${{ hashFiles('yarn.lock') }}
106+
restore-keys: |
107+
${{ runner.os }}-playwright-
108+
109+
- name: Install Playwright browsers
110+
run: yarn playwright install --with-deps chromium
111+
112+
- name: Run web e2e tests
113+
run: yarn playwright test --config .playwright/playwright.config.ts
114+
115+
- name: Upload Playwright report
116+
if: failure()
117+
uses: actions/upload-artifact@v4
118+
with:
119+
name: playwright-report
120+
path: .playwright/playwright-report/
121+
retention-days: 7
122+
89123
build-library:
90124
runs-on: ubuntu-latest
91125
steps:

0 commit comments

Comments
 (0)