mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:31:48 +00:00
This reverts commit 4c23391014 and adds a workaround to the Storybook Vite configuration to make it work.
This commit is contained in:
parent
9b35dfe55e
commit
afcdb98b70
@ -63,6 +63,20 @@ const config: StorybookConfig & StorybookConfigVite & ReactViteStorybookConfig =
|
||||
|
||||
viteFinal: config => {
|
||||
config.define = { ...config.define, 'process.env.CHROMATIC': getEnvironmentBoolean('CHROMATIC') }
|
||||
|
||||
config.build = {
|
||||
...config.build,
|
||||
minify: false,
|
||||
|
||||
// HACK(sqs): cssCodeSplit is needed to avoid `Failed to fetch dynamically imported
|
||||
// module: ...` errors where SourcegraphWebApp.scss's JavaScript stub file with the CSS
|
||||
// module class names is not emitted in the Storybook build. (It works in the dev
|
||||
// server.) This is not a perfect workaround as there are some incorrect global styles
|
||||
// being applied, but it's mostly fine (and any discrepancies are likely due to our
|
||||
// misuse of global CSS anyway).
|
||||
cssCodeSplit: false,
|
||||
}
|
||||
|
||||
config.css = {
|
||||
...config.css,
|
||||
modules: {
|
||||
|
||||
@ -321,10 +321,8 @@ func clientChromaticTests(opts CoreTestOperationsOptions) operations.Operation {
|
||||
chromaticCommand += " | ./dev/ci/post-chromatic.sh"
|
||||
}
|
||||
|
||||
// TODO(sqs): build is failing (https://buildkite.com/sourcegraph/sourcegraph/builds/246235#018b0c9a-38be-43ed-af9e-d8cf04ab7305)
|
||||
_ = stepOpts
|
||||
_ = chromaticCommand
|
||||
// pipeline.AddStep(":chromatic: Upload Storybook to Chromatic", append(stepOpts, bk.Cmd(chromaticCommand))...)
|
||||
pipeline.AddStep(":chromatic: Upload Storybook to Chromatic",
|
||||
append(stepOpts, bk.Cmd(chromaticCommand))...)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ The default run type.
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
- **Pipeline setup**: Trigger async
|
||||
|
||||
@ -37,7 +37,7 @@ The default run type.
|
||||
- Perform bazel prechecks
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
|
||||
- Pipeline for `DatabaseSchema` changes:
|
||||
@ -141,7 +141,7 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
- **Publish candidate images**: Push candidate Images
|
||||
- **End-to-end tests**: Executors E2E
|
||||
@ -203,7 +203,7 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
- **Publish candidate images**: Push candidate Images
|
||||
- **End-to-end tests**: Executors E2E
|
||||
@ -221,7 +221,7 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
- **Publish candidate images**: Push candidate Images
|
||||
- **End-to-end tests**: Executors E2E
|
||||
@ -262,7 +262,7 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
- **Publish candidate images**: Push candidate Images
|
||||
- **End-to-end tests**: Executors E2E
|
||||
@ -285,7 +285,7 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
- **Publish candidate images**: Push candidate Images
|
||||
- **End-to-end tests**: Executors E2E
|
||||
@ -361,7 +361,7 @@ Base pipeline (more steps might be included based on branch changes):
|
||||
- Tests
|
||||
- Async BackCompat Tests
|
||||
- **Linters and static analysis**: Run sg lint
|
||||
- **Client checks**: Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Client checks**: Upload Storybook to Chromatic, Enterprise build, Build (client/jetbrains), Tests for VS Code extension, Stylelint (all)
|
||||
- **Security Scanning**: Sonarcloud Scan
|
||||
- **Publish candidate images**: Push candidate Images
|
||||
- **End-to-end tests**: Executors E2E
|
||||
|
||||
Loading…
Reference in New Issue
Block a user