Skip to content

Commit 5b10e34

Browse files
committed
matrix
1 parent 6da2df0 commit 5b10e34

File tree

5 files changed

+78
-39
lines changed

5 files changed

+78
-39
lines changed

.github/workflows/playwright.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,36 @@ on:
66
pull_request:
77

88
jobs:
9+
get-apps:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
apps: ${{ steps.output-apps.outputs.apps }}
13+
steps:
14+
- name: Check out code
15+
uses: actions/checkout@v4
16+
17+
- name: Compile apps list
18+
run: pnpm exec tsc examples/common/apps.ts
19+
20+
- name: Output apps
21+
id: output-apps
22+
uses: actions/github-script@v7
23+
with:
24+
script: |
25+
const { apps } = await import('${{ github.workspace }}/examples/common/apps.js');
26+
27+
core.setOutput("apps", JSON.stringify(apps));
28+
929
test:
1030
timeout-minutes: 30
31+
needs: [get-apps]
1132
strategy:
12-
fail-fast: true
33+
fail-fast: false
1334
matrix:
35+
app: ${{ needs.get-apps.outputs.apps }}
1436
os: [ubuntu-latest, windows-latest]
1537
runs-on: ${{ matrix.os }}
38+
name: ${{ matrix.app }} (${{ matrix.os }})
1639
steps:
1740
- name: Check out code
1841
uses: actions/checkout@v4
@@ -27,17 +50,17 @@ jobs:
2750
run: pnpm build
2851

2952
- name: Build all workers
30-
run: pnpm -r build:worker
53+
run: pnpm --filter ${{ matrix.app }} build:worker
3154

3255
- name: Run playwright tests
33-
run: pnpm e2e
56+
run: pnpm --filter ${{ matrix.app }} e2e
3457

3558
- name: Run playwright dev tests
36-
run: pnpm e2e:dev
59+
run: pnpm --filter ${{ matrix.app }} e2e:dev
3760

3861
- uses: actions/upload-artifact@v4
3962
if: always()
4063
with:
4164
name: playwright-report
42-
path: ./**/playwright-report
65+
path: ./**/playwright-report-${{ matrix.app }}-${{ matrix.os }}
4366
retention-days: 1

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ output
55
.open-next
66
.wrangler
77
.turbo
8-
dist
8+
dist
9+
examples/common/apps.js

examples/common/apps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// List of all e2e tested apps
2-
const apps = [
2+
export const apps = [
33
// examples
44
"create-next-app",
55
"middleware",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"@changesets/cli": "^2.27.9",
88
"@playwright/test": "catalog:",
99
"pkg-pr-new": "^0.0.29",
10-
"prettier": "3.3.3"
10+
"prettier": "3.3.3",
11+
"typescript": "catalog:"
1112
},
1213
"scripts": {
1314
"fix": "pnpm prettier:fix && pnpm lint:fix",

0 commit comments

Comments
 (0)