5050 id : soft-release
5151 run : vp dlx pkg-pr-new publish './packages/*' # TODO disabled only for AI branch--compact
5252
53- playwright -build :
54- name : " Playwright Build"
53+ e2e -build :
54+ name : " E2E Build"
5555 runs-on : ubuntu-latest
5656 timeout-minutes : 30
5757 steps :
@@ -67,79 +67,36 @@ jobs:
6767 - name : Install dependencies
6868 run : vp install
6969
70+ # Example apps mounted by the e2e tests import the @blocknote/* packages'
71+ # built dist.
7072 - name : Build packages
71- run : vp run -r build
73+ run : vp run --filter ./packages build
7274
73- - name : Upload build artifacts
75+ - name : Upload package dist
7476 uses : actions/upload-artifact@v7
7577 with :
76- name : playwright-build
77- path : |
78- packages/*/dist
79- playground/dist
78+ name : e2e-package-dist
79+ path : packages/*/dist
8080 retention-days : 1
8181
82- playwright :
83- name : " Playwright Tests - ${{ matrix.browser }} (${{ matrix.shardIndex }}/${{ matrix.shardTotal }})"
82+ e2e :
83+ # Vitest Browser Mode runs in the Playwright Linux container — the same
84+ # environment as the local Docker run — so behaviour matches local dev.
85+ name : " E2E - ${{ matrix.browser }}"
8486 runs-on : ubuntu-latest
85- needs : playwright -build
87+ needs : e2e -build
8688 timeout-minutes : 30
8789 container :
8890 image : mcr.microsoft.com/playwright:v1.51.1-noble
8991 strategy :
9092 fail-fast : false
9193 matrix :
9294 browser : [chromium, firefox, webkit]
93- shardIndex : [1, 2]
94- shardTotal : [2]
9595 steps :
9696 - uses : actions/checkout@v6
9797 with :
9898 fetch-depth : 100
9999
100- - uses : voidzero-dev/setup-vp@v1
101- with :
102- node-version-file : " .node-version"
103- cache : true
104-
105- - name : Download build artifacts
106- uses : actions/download-artifact@v8
107- with :
108- name : playwright-build
109-
110- - name : Install dependencies
111- run : vp install
112-
113- - name : Run server and Playwright tests
114- run : |
115- HOME=/root vp exec concurrently --success=first -r --kill-others \
116- "vp run --filter @blocknote/example-editor preview" \
117- "wait-on http://localhost:3000 && cd tests && vp exec playwright test --project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}"
118-
119- - name : Upload blob report
120- uses : actions/upload-artifact@v7
121- if : ${{ !cancelled() }}
122- with :
123- name : blob-report-${{ matrix.browser }}-${{ matrix.shardIndex }}
124- path : tests/blob-report/
125- retention-days : 1
126-
127- - name : Upload HTML report
128- uses : actions/upload-artifact@v7
129- if : ${{ !cancelled() }}
130- with :
131- name : playwright-report-${{ matrix.browser }}-${{ matrix.shardIndex }}
132- path : tests/playwright-report/
133- retention-days : 30
134-
135- merge-reports :
136- name : " Merge Playwright Reports"
137- if : ${{ !cancelled() }}
138- needs : playwright
139- runs-on : ubuntu-latest
140- steps :
141- - uses : actions/checkout@v6
142-
143100 - uses : voidzero-dev/setup-vp@v1
144101 with :
145102 node-version-file : " .node-version"
@@ -148,20 +105,22 @@ jobs:
148105 - name : Install dependencies
149106 run : vp install
150107
151- - name : Download blob reports
108+ - name : Download package dist
152109 uses : actions/download-artifact@v8
153110 with :
154- path : tests/all-blob-reports
155- pattern : blob-report-*
156- merge-multiple : true
111+ name : e2e-package-dist
112+ path : packages
157113
158- - name : Merge reports
159- run : vp exec playwright merge-reports --reporter html ./all-blob-reports
114+ # No preview server: Vitest Browser Mode serves the tests + mounted example
115+ # apps itself. `--browser` selects this matrix shard's browser.
116+ - name : Run e2e tests (${{ matrix.browser }})
117+ run : HOME=/root vp test -c vite.config.browser.ts --run --browser ${{ matrix.browser }}
160118 working-directory : tests
161119
162- - name : Upload merged HTML report
120+ - name : Upload failure artifacts
163121 uses : actions/upload-artifact@v7
122+ if : ${{ failure() }}
164123 with :
165- name : playwright-report-merged
166- path : tests/playwright-report /
167- retention-days : 30
124+ name : e2e-attachments-${{ matrix.browser }}
125+ path : tests/.vitest-attachments /
126+ retention-days : 7
0 commit comments