66 pull_request :
77 types : [opened, synchronize, reopened, edited]
88
9- permissions :
10- contents : read
11-
129env :
1310 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
1411
@@ -18,12 +15,11 @@ jobs:
1815 runs-on : ubuntu-latest
1916 timeout-minutes : 60
2017 steps :
21- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
18+ - uses : actions/checkout@v6
2219 with :
2320 fetch-depth : 100
24- persist-credentials : false
2521
26- - uses : voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1
22+ - uses : voidzero-dev/setup-vp@v1
2723 with :
2824 node-version-file : " .node-version"
2925 cache : true
4541 working-directory : tests
4642
4743 - name : Upload webpack stats artifact (editor)
48- uses : relative-ci/agent-upload-artifact-action@a2b5741b4f7e6a989c84ec1a3059696b23c152e5 # v2
44+ uses : relative-ci/agent-upload-artifact-action@v2
4945 with :
5046 webpackStatsFile : ./playground/dist/webpack-stats.json
5147 artifactName : relative-ci-artifacts-editor
@@ -54,122 +50,77 @@ jobs:
5450 id : soft-release
5551 run : vp dlx pkg-pr-new publish './packages/*' # TODO disabled only for AI branch--compact
5652
57- playwright -build :
58- name : " Playwright Build"
53+ e2e -build :
54+ name : " E2E Build"
5955 runs-on : ubuntu-latest
6056 timeout-minutes : 30
6157 steps :
62- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
58+ - uses : actions/checkout@v6
6359 with :
6460 fetch-depth : 100
65- persist-credentials : false
6661
67- - uses : voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1
62+ - uses : voidzero-dev/setup-vp@v1
6863 with :
6964 node-version-file : " .node-version"
7065 cache : true
7166
7267 - name : Install dependencies
7368 run : vp install
7469
70+ # Example apps mounted by the e2e tests import the @blocknote/* packages'
71+ # built dist.
7572 - name : Build packages
76- run : vp run -r build
73+ run : vp run --filter ./packages build
7774
78- - name : Upload build artifacts
79- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
75+ - name : Upload package dist
76+ uses : actions/upload-artifact@v7
8077 with :
81- name : playwright-build
82- path : |
83- packages/*/dist
84- playground/dist
78+ name : e2e-package-dist
79+ path : packages/*/dist
8580 retention-days : 1
8681
87- playwright :
88- 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 }}"
8986 runs-on : ubuntu-latest
90- needs : playwright -build
87+ needs : e2e -build
9188 timeout-minutes : 30
9289 container :
9390 image : mcr.microsoft.com/playwright:v1.51.1-noble
9491 strategy :
9592 fail-fast : false
9693 matrix :
9794 browser : [chromium, firefox, webkit]
98- shardIndex : [1, 2]
99- shardTotal : [2]
10095 steps :
101- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
96+ - uses : actions/checkout@v6
10297 with :
10398 fetch-depth : 100
104- persist-credentials : false
105-
106- - uses : voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1
107- with :
108- node-version-file : " .node-version"
109- cache : true
110-
111- - name : Download build artifacts
112- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
113- with :
114- name : playwright-build
115-
116- - name : Install dependencies
117- run : vp install
118-
119- - name : Run server and Playwright tests
120- run : |
121- HOME=/root vp exec concurrently --success=first -r --kill-others \
122- "vp run --filter @blocknote/example-editor preview" \
123- "wait-on http://localhost:3000 && cd tests && vp exec playwright test --project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}"
124-
125- - name : Upload blob report
126- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
127- if : ${{ !cancelled() }}
128- with :
129- name : blob-report-${{ matrix.browser }}-${{ matrix.shardIndex }}
130- path : tests/blob-report/
131- retention-days : 1
132-
133- - name : Upload HTML report
134- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
135- if : ${{ !cancelled() }}
136- with :
137- name : playwright-report-${{ matrix.browser }}-${{ matrix.shardIndex }}
138- path : tests/playwright-report/
139- retention-days : 30
140-
141- merge-reports :
142- name : " Merge Playwright Reports"
143- if : ${{ !cancelled() }}
144- needs : playwright
145- runs-on : ubuntu-latest
146- steps :
147- - uses : actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
148- with :
149- persist-credentials : false
15099
151- - uses : voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1
100+ - uses : voidzero-dev/setup-vp@v1
152101 with :
153102 node-version-file : " .node-version"
154103 cache : true
155104
156105 - name : Install dependencies
157106 run : vp install
158107
159- - name : Download blob reports
160- uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
108+ - name : Download package dist
109+ uses : actions/download-artifact@v8
161110 with :
162- path : tests/all-blob-reports
163- pattern : blob-report-*
164- merge-multiple : true
111+ name : e2e-package-dist
112+ path : packages
165113
166- - name : Merge reports
167- 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 }}
168118 working-directory : tests
169119
170- - name : Upload merged HTML report
171- uses : actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
120+ - name : Upload failure artifacts
121+ uses : actions/upload-artifact@v7
122+ if : ${{ failure() }}
172123 with :
173- name : playwright-report-merged
174- path : tests/playwright-report /
175- retention-days : 30
124+ name : e2e-attachments-${{ matrix.browser }}
125+ path : tests/.vitest-attachments /
126+ retention-days : 7
0 commit comments