Skip to content

Commit 07c55d6

Browse files
committed
ci(device): pin actions and use the vp toolchain
zizmor (repo policy) requires actions pinned to hashes; the workflow also diverged from how every other workflow sets up — checkout + setup-vp with the shared pins, persist-credentials off, an explicit least-privilege permissions block, and vp for install/run. The test:device script drops its pnpm invocation for the same reason: CI only provides vp.
1 parent d896e15 commit 07c55d6

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/device-tests.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,29 @@ on:
1313
required: false
1414
default: ""
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
device-tests:
1821
runs-on: ubuntu-latest
1922
timeout-minutes: 45
2023
steps:
21-
- uses: actions/checkout@v4
22-
23-
- uses: pnpm/action-setup@v4
24+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
25+
with:
26+
persist-credentials: false
2427

25-
- uses: actions/setup-node@v4
28+
- uses: voidzero-dev/setup-vp@313600b80b104eadebb9111787d37a2e83e014ca # v1.17.0
2629
with:
27-
node-version: 22
28-
cache: "pnpm"
30+
node-version-file: ".node-version"
31+
cache: true
2932

3033
- name: Install dependencies
31-
run: pnpm install --frozen-lockfile
34+
run: vp install
3235

3336
- name: Start playground dev server
3437
run: |
35-
pnpm run dev &
38+
vp run dev &
3639
for i in $(seq 1 120); do
3740
if curl -sf http://127.0.0.1:5173/ > /dev/null; then exit 0; fi
3841
sleep 2
@@ -45,11 +48,11 @@ jobs:
4548
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
4649
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
4750
DEVICE_FILTER: ${{ inputs.device_filter }}
48-
run: pnpm run test:device
51+
run: vp run test:device
4952

5053
- name: Upload screenshots
5154
if: always()
52-
uses: actions/upload-artifact@v4
55+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
5356
with:
5457
name: device-test-screenshots
5558
path: tests/device/.artifacts/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"prestart": "vp run build",
3737
"start": "vp run --filter @blocknote/example-editor preview",
3838
"test": "vp run --filter \"@blocknote/*\" --filter \"docs\" test",
39-
"test:device": "pnpm --dir tests exec vitest run --config device/vitest.config.mts",
39+
"test:device": "vp -C tests exec vitest run --config device/vitest.config.mts",
4040
"format": "vp fmt",
4141
"prepare": "vp config"
4242
},

0 commit comments

Comments
 (0)