Skip to content

Commit

Permalink
Merge pull request #30232 from storybookjs/jeppe/fix-bench-base-with-…
Browse files Browse the repository at this point in the history
…slash

Benchmark: Fix script breaking when base branch has slashes
  • Loading branch information
JReinhold authored Jan 10, 2025
2 parents 1389976 + f53509d commit f43a567
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,6 @@ jobs:
yarn bench-packages --upload
- store_artifacts:
path: bench/packages/results.json
- store_artifacts:
path: bench/packages/compare-with-<< pipeline.parameters.ghBaseBranch >>.json
- report-workflow-on-failure
- cancel-workflow-on-failure
check:
Expand Down
6 changes: 0 additions & 6 deletions docs/writing-tests/test-addon.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,6 @@ If the URLs are not working when running tests in CI, you should ensure the Stor

If your stories use assets in the public directory and you're not using the default public directory location (`public`), you need to adjust the Vitest configuration to include the public directory. You can do this by providing the [`publicDir` option in the Vitest configuration file](https://vitejs.dev/config/shared-options.html#publicdir).

### How do I apply custom Vite configuration?

Your Storybook project's Vite configuration (in [`viteFinal`](../api/main-config/main-config-vite-final.mdx) in your `.storybook/main.js|ts` file) is automatically applied to your Vitest configuration, with one exception: the plugins.

If you are running any plugins in `viteFinal`, you will likely also need to run those in the Vitest configuration.

### How do I isolate Storybook tests from others?

Some projects might contain a `test` property in their Vite configuration. Because the Vitest configuration used by this plugin extends that Vite config, the `test` properties are merged. This lack of isolation can cause issues with your Storybook tests.
Expand Down
10 changes: 0 additions & 10 deletions scripts/bench/bench-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,6 @@ const run = async () => {
if (options.baseBranch) {
const comparisonResults = await compareResults({ results, baseBranch: options.baseBranch });
const resultsAboveThreshold = filterResultsByThresholds(comparisonResults);
await saveLocally({
filename: `compare-with-${options.baseBranch}.json`,
results: comparisonResults,
diff: true,
});
await saveLocally({
filename: `comparisons-above-threshold-with-${options.baseBranch}.json`,
results: resultsAboveThreshold,
diff: true,
});
if (options.pullRequest) {
await uploadToGithub({
results: resultsAboveThreshold,
Expand Down

0 comments on commit f43a567

Please sign in to comment.