ui: make ci run storybook tests

This commit is contained in:
Glen Huang
2025-10-20 20:46:01 +08:00
parent 51fd60917e
commit 03640e44a4
2 changed files with 25 additions and 23 deletions

View File

@@ -41,6 +41,6 @@
inherit (config.packages) clan-ts-api;
};
checks = config.packages.clan-app.tests;
checks = config.packages.clan-app.tests // config.packages.clan-app-ui.tests;
};
}

View File

@@ -36,31 +36,33 @@ buildNpmPackage (finalAttrs: {
# `npm run test-storybook-static` works fine in the devshell
passthru = {
storybook = buildNpmPackage {
pname = "${finalAttrs.pname}-storybook";
inherit (finalAttrs)
version
nodejs
src
npmDeps
npmConfigHook
;
tests = {
"${finalAttrs.pname}-storybook" = buildNpmPackage {
pname = "${finalAttrs.pname}-storybook";
inherit (finalAttrs)
version
nodejs
src
npmDeps
npmConfigHook
;
nativeBuildInputs = finalAttrs.nativeBuildInputs ++ [
ps
];
nativeBuildInputs = finalAttrs.nativeBuildInputs ++ [
ps
];
npmBuildScript = "test-storybook";
npmBuildScript = "test-storybook";
env = {
PLAYWRIGHT_BROWSERS_PATH = "${playwright-driver.browsers.override {
withFfmpeg = false;
withFirefox = false;
withWebkit = true;
withChromium = false;
withChromiumHeadlessShell = false;
}}";
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true;
env = {
PLAYWRIGHT_BROWSERS_PATH = "${playwright-driver.browsers.override {
withFfmpeg = false;
withFirefox = false;
withWebkit = true;
withChromium = false;
withChromiumHeadlessShell = false;
}}";
PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true;
};
};
};
};