Skip to content

Commit 8850616

Browse files
committed
Try to fix the workflow....
1 parent 8ab2530 commit 8850616

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

.github/workflows/pull-request.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,20 @@ jobs:
2525
- 'devserver/**'
2626
libraries:
2727
- 'lib/**'
28-
modules:
29-
- src/{bundles,tabs}/**
28+
tabs:
29+
- src/tabs/**
30+
bundles:
31+
- src/bundles/**
3032
docs:
3133
- docs/**
3234
outputs:
3335
# if the workflow file was modified, then we rerun the entire job
3436
devserver: ${{ steps.filter.outputs.devserver || steps.filter.outputs.workflows }}
3537
# if the devserver needs to be tested bundles and tabs need to be rebuilt
36-
modules: ${{ steps.filter.outputs.modules || steps.filter.outputs.workflows || steps.filter.outputs.devserver }}
38+
modules: ${{ steps.filter.outputs.tabs || steps.filter.outputs.bundles || steps.filter.outputs.workflows || steps.filter.outputs.devserver }}
3739
libraries: ${{ steps.filter.outputs.libraries || steps.filter.outputs.workflows }}
3840
docs: ${{ steps.filter.outputs.docs || steps.filter.outputs.workflows }}
41+
playwright: $${{ steps.filter.outputs.devserver || steps.filter.outputs.libraries || steps.filter.outputs.bundles }}
3942

4043
test:
4144
name: Verify all tests pass and build success
@@ -61,6 +64,10 @@ jobs:
6164
- name: Install dependencies
6265
run: yarn install --immutable
6366

67+
- name: Install Playwright
68+
if: needs.paths-filter.outputs.playwright == 'true'
69+
run: yarn playwright install --with-deps
70+
6471
- name: Run tsc for libraries
6572
if: needs.paths-filter.outputs.libraries == 'true'
6673
run: yarn workspaces foreach -ptW --from "./lib/*" run tsc
@@ -75,7 +82,7 @@ jobs:
7582

7683
- name: Test bundles and tabs
7784
if: needs.paths-filter.outputs.modules == 'true'
78-
run: playwright install --with-deps && yarn test:modules
85+
run: yarn test:modules
7986

8087
- name: Build manifest
8188
if: needs.paths-filter.outputs.devserver == 'true'

devserver/vite.config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import fs from 'fs/promises';
55
import pathlib from 'path';
66
import react from '@vitejs/plugin-react';
77
import { nodePolyfills } from 'vite-plugin-node-polyfills';
8-
import { loadEnv, defineConfig, type UserConfig, type ResolverFunction } from 'vite'
8+
import { loadEnv, defineConfig, type UserConfig } from 'vite'
99
import { mergeConfig } from 'vitest/config';
1010
import type { BrowserCommand } from 'vitest/node';
1111
import rootConfig from '../vitest.config';
@@ -85,8 +85,7 @@ export default defineConfig(({ mode }) => {
8585
headless: true,
8686
provider: 'playwright',
8787
instances: [{
88-
browser: 'chromium',
89-
screenshotFailures: false
88+
browser: 'chromium'
9089
}],
9190
commands: {
9291
setLocalStorage

lib/modules-lib/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"typedoc-plugin-rename-defaults": "^0.7.3",
1616
"typescript": "^5.8.2",
1717
"vitest": "^3.2.3",
18-
"vitest-browser-react": "^1.0.0"
18+
"vitest-browser-react": "^1.0.0",
19+
"@vitejs/plugin-react": "^4.5.1"
1920
},
2021
"exports": {
2122
"./tabs/index": null,

lib/modules-lib/vitest.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
// @ts-check
21
// Modules-lib test config
2+
import react from '@vitejs/plugin-react';
33
import { defineProject, mergeConfig } from 'vitest/config';
44
import rootConfig from '../../vitest.config';
55

66
export default mergeConfig(
77
rootConfig,
88
defineProject({
9+
plugins: [react()],
910
test: {
1011
name: 'Modules Library',
1112
include: [`${import.meta.dirname}/**/__tests__/*.test.{ts,tsx}`],

0 commit comments

Comments
 (0)