Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Benchmark: Fix script breaking when base branch has slashes #30232

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading