From c51739c89f3a55e2dabdb587534469f2f3af334e Mon Sep 17 00:00:00 2001 From: Dusty Greif Date: Tue, 7 Oct 2025 15:53:32 -0400 Subject: [PATCH 1/3] Install chromium in CI --- .github/workflows/nodejs.yml | 1 + .github/workflows/publish.yml | 1 + .github/workflows/release.yml | 1 + vitest.config.js | 5 +---- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index b9adc8e..16e8582 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -30,6 +30,7 @@ jobs: run: npm ci - name: npm build run: npm run build --if-present + - run: npx playwright install chromium - name: npm test run: npm test env: diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3be8a08..6cfd482 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,6 +19,7 @@ jobs: registry-url: https://registry.npmjs.org/ cache: npm - run: npm ci + - run: npx playwright install chromium - run: npm test - run: npm version ${TAG_NAME} --git-tag-version=false env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2f31d8..dec8cfe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,6 +25,7 @@ jobs: uses: actions/checkout@v4 - name: Preparation uses: ./.github/actions/setup + - run: npx playwright install chromium - name: Perform last-minute tests run: npm test - name: Configure Git diff --git a/vitest.config.js b/vitest.config.js index 395f23b..79eba8b 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -8,10 +8,7 @@ export default defineConfig({ provider: 'playwright', instances: [ { - browser: 'chromium', - launch: { - executablePath: '/usr/bin/chromium-browser' - } + browser: 'chromium' } ] } From 262f190dac815b9482a6b1b4dbbb6fe017964e52 Mon Sep 17 00:00:00 2001 From: Dusty Greif Date: Tue, 7 Oct 2025 15:53:43 -0400 Subject: [PATCH 2/3] Enable headless mode --- vitest.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/vitest.config.js b/vitest.config.js index 79eba8b..4e56104 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -6,6 +6,7 @@ export default defineConfig({ browser: { enabled: true, provider: 'playwright', + headless: true, instances: [ { browser: 'chromium' From 4efcc315f1ede600eb5762afa6881b45ba5bc21e Mon Sep 17 00:00:00 2001 From: Dusty Greif Date: Tue, 7 Oct 2025 15:54:29 -0400 Subject: [PATCH 3/3] Ignore vitest screenshots --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index de4d1f0..ce9a433 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ dist node_modules +test/__screenshots__