mirror of
https://github.com/vector-im/element-call.git
synced 2026-08-05 19:59:20 +00:00
test in CI
This commit is contained in:
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
@@ -23,7 +23,7 @@ jobs:
|
|||||||
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
|
# ignore-pnpmfile should never be commited. Make CI crash if it happened (`pnpmfileChecksum` is present)
|
||||||
run: "pnpm install --frozen-lockfile --ignore-pnpmfile"
|
run: "pnpm install --frozen-lockfile --ignore-pnpmfile"
|
||||||
- name: Install Playwright Browsers
|
- name: Install Playwright Browsers
|
||||||
run: pnpm exec playwright install
|
run: pnpm exec playwright install --with-deps chromium
|
||||||
- name: Vitest
|
- name: Vitest
|
||||||
run: "pnpm run test:coverage"
|
run: "pnpm run test:coverage"
|
||||||
- name: Upload to codecov
|
- name: Upload to codecov
|
||||||
|
|||||||
17
.storybook/vitest.setup.ts
Normal file
17
.storybook/vitest.setup.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2026 Element Creations Ltd.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
|
Please see LICENSE in the repository root for full details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { beforeAll } from "vitest";
|
||||||
|
import { setProjectAnnotations } from "@storybook/react-vite";
|
||||||
|
import * as projectAnnotations from "./preview";
|
||||||
|
|
||||||
|
// Apply the right Storybook configuration when testing stories.
|
||||||
|
// See: https://storybook.js.org/docs/api/portable-stories/portable-stories-vitest#setprojectannotations
|
||||||
|
const annotations = setProjectAnnotations([projectAnnotations]);
|
||||||
|
|
||||||
|
// Run Storybook's beforeAll hook (sets up decorators, parameters, etc.)
|
||||||
|
beforeAll(annotations.beforeAll);
|
||||||
@@ -39,6 +39,7 @@ export default defineConfig((configEnv) =>
|
|||||||
],
|
],
|
||||||
test: {
|
test: {
|
||||||
name: "storybook",
|
name: "storybook",
|
||||||
|
setupFiles: [".storybook/vitest.setup.ts"],
|
||||||
browser: {
|
browser: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
// Make sure to install Playwright
|
// Make sure to install Playwright
|
||||||
|
|||||||
Reference in New Issue
Block a user