Skip to content

Commit 60fc7dd

Browse files
committed
chore: Enhance CI workflows by adding TypeScript type checking, linting, and unit tests. Update E2E tests to run with a fixed browser and streamline artifact handling.
1 parent 76405d0 commit 60fc7dd

File tree

2 files changed

+33
-10
lines changed

2 files changed

+33
-10
lines changed

.github/workflows/changesets.yml

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,28 @@ jobs:
3838
- name: Build package
3939
run: pnpm build
4040

41-
- name: Run full test suite
42-
run: pnpm test:sweep
41+
- name: Run TypeScript type checking
42+
run: pnpm typecheck
43+
44+
- name: Run linting
45+
run: pnpm lint
46+
47+
- name: Run unit tests
48+
run: pnpm test:unit
49+
50+
- name: Lint example app
51+
run: pnpm example:lint
52+
53+
- name: Type check example app
54+
run: pnpm example:typecheck
55+
56+
- name: Install Playwright browsers
57+
run: npx playwright install --with-deps chromium
58+
59+
- name: Run E2E tests
60+
run: pnpm test:e2e --project=chromium
61+
env:
62+
CI: true
4363

4464
- name: Create Release Pull Request or Publish
4565
id: changesets

.github/workflows/ci.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ jobs:
150150
example-typecheck:
151151
name: Type Check Example App
152152
runs-on: ubuntu-latest
153+
needs: build
153154
steps:
154155
- name: Checkout code
155156
uses: actions/checkout@v4
@@ -168,17 +169,19 @@ jobs:
168169
- name: Install dependencies
169170
run: pnpm install --frozen-lockfile
170171

172+
- name: Download build artifacts
173+
uses: actions/download-artifact@v4
174+
with:
175+
name: dist
176+
path: dist
177+
171178
- name: Type check example app
172179
run: pnpm example:typecheck
173180

174181
e2e-tests:
175-
name: E2E Tests (${{ matrix.browser }})
182+
name: E2E Tests
176183
runs-on: ubuntu-latest
177184
needs: build
178-
strategy:
179-
fail-fast: false
180-
matrix:
181-
browser: [chromium, firefox, webkit]
182185
steps:
183186
- name: Checkout code
184187
uses: actions/checkout@v4
@@ -204,18 +207,18 @@ jobs:
204207
path: dist
205208

206209
- name: Install Playwright browsers
207-
run: npx playwright install --with-deps ${{ matrix.browser }}
210+
run: npx playwright install --with-deps chromium
208211

209212
- name: Run E2E tests
210-
run: pnpm test:e2e --project=${{ matrix.browser }}
213+
run: pnpm test:e2e --project=chromium
211214
env:
212215
CI: true
213216

214217
- name: Upload Playwright report
215218
uses: actions/upload-artifact@v4
216219
if: failure()
217220
with:
218-
name: playwright-report-${{ matrix.browser }}
221+
name: playwright-report
219222
path: playwright-report/
220223
retention-days: 7
221224

0 commit comments

Comments
 (0)