-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
CI: Split CircleCI config into multiple files #32025
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
Open
ghengeveld
wants to merge
2
commits into
circleci-config-sort
Choose a base branch
from
circleci-config-pack
base: circleci-config-sort
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# CircleCI configuration | ||
|
||
This directory contains the CircleCI configuration for the Storybook project. The CircleCI configuration is split across multiple files and packed into a single `config.yml` using the `circleci config pack` command. This approach follows the [FYAML specification](https://github.com/CircleCI-Public/fyaml) for decomposing large YAML documents into multiple files. | ||
|
||
### Packing process | ||
|
||
To regenerate (pack) the CircleCI config file and validate it: | ||
|
||
```bash | ||
circleci config pack .circleci/src > .circleci/config.yml | ||
circleci config validate .circleci/config.yml | ||
``` | ||
|
||
Commit the updated `config.yml` like any other file. | ||
|
||
You will need the [CircleCI local CLI](https://circleci.com/docs/local-cli/#installation). For more details on config packing, see the [CircleCI documentation](https://circleci.com/docs/how-to-use-the-circleci-local-cli/#packing-a-config). | ||
|
||
### Local testing | ||
|
||
To test individual jobs locally: | ||
|
||
```bash | ||
circleci config process .circleci/config.yml > process.yml | ||
circleci local execute -c process.yml <job-name> | ||
ghengeveld marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
|
||
You will need to have Docker installed to be able to do this. See the [CircleCI docs](https://circleci.com/docs/how-to-use-the-circleci-local-cli/#run-a-job-in-a-container-on-your-machine) for details and limitations. | ||
|
||
## Configuration overview | ||
|
||
The Storybook CircleCI setup is a multi-workflow system designed to test Storybook across multiple frameworks, bundlers, and package managers. | ||
|
||
### Parameters | ||
|
||
The configuration accepts several pipeline parameters: | ||
|
||
- **`workflow`**: Which workflow to run (`normal`, `merged`, `daily`, `skipped`, `docs`) | ||
- **`ghPrNumber`**: GitHub PR number for PR-specific testing | ||
- **`ghBaseBranch`**: Base branch name for comparison testing | ||
|
||
### Workflows | ||
|
||
- **`normal`**: Standard PR checks, running the most important sandboxes | ||
- **`merged`**: Post-merge PR checks, running against more sandboxes | ||
- **`daily`**: Daily job, running against even more sandboxes and empty directory | ||
- **`docs`**: Documentation checks | ||
|
||
### Jobs | ||
|
||
- **`build`**: Compiles code, publishes to local Verdaccio registry | ||
- **`lint`**: ESLint + Prettier checks | ||
- **`knip`**: Unused dependency detection | ||
- **`check`**: Type checking and validation | ||
- **`unit-tests`**: Vitest-based unit tests | ||
- **`e2e-ui`**: End-to-end tests for Storybook's manager UI | ||
- **`test-init-empty`**: Tests Storybook init from empty directories | ||
- **`test-init-features`**: Tests Storybook initialization with features | ||
- **`test-portable-stories`**: Tests portable stories across frameworks | ||
- **`create-sandboxes`**: Generates framework-specific test environments (sandboxes) | ||
- **`chromatic-sandboxes`**: Visual regression testing against each sandbox | ||
- **`e2e-dev`**: End-to-end tests against a Storybook dev server for each sandbox | ||
- **`e2e-production`**: End-to-end tests against static production Storybooks for each sandbox | ||
- **`test-runner-production`**: Run the Test Runner against each sandbox | ||
- **`vitest-integration`**: Run the Vitest tests of each sandbox | ||
|
||
### TODOs | ||
|
||
Several jobs are currently disabled due to flakiness: | ||
- `bench-sandboxes`: Performance benchmarking | ||
- `test-runner-dev`: Dev mode test runner | ||
- `smoke-test-sandboxes`: Quick smoke tests | ||
- Some package managers in daily workflow |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.