A collection of "smoke"-test that verify that the package layout is correct.
createFixture
is used to create new or update existing fixtures.
The created file might need some manual adjustment since not every edge case is covered.
- Navigate into the fixture you want to test (where the
package.json
is located) - Use the node version you want to use (for example
nvm use 14.0.0
) - Prepare the package.json
- to test a Pull Request
- checkout branch
pnpm
pnpm lerna run build --scope "@mui/*"
cd
to fixturepnpm install
node ../../scripts/useBuildFromSource.js .
- to test a published npm dist tag (for example
latest
ornext
) on npmcd
to fixture- adjust the dependencies in the package.json accordingly
pnpm install
- to test a Pull Request
pnpm start
should exit with 0
You have to run our CircleCI pipeline with the workflow
parameter set to bundling
.
With the following API request we're triggering a run of the bundling workflow in PR #24289:
curl --request POST \
--url https://circleci.com/api/v2/project/gh/mui/material-ui/pipeline \
--header 'content-type: application/json' \
--header 'Circle-Token: $CIRCLE_TOKEN' \
--data-raw '{"branch":"pull/24289/head","parameters":{"workflow":"bundling"}}'
$CIRCLE_TOKEN
must be set as an environment variable created from https://app.circleci.com/settings/user/tokens.
- Create a folder in
test/fixtures/bundling
- Add the necessary dependencies
- Re-use the entries for
dependencies
andresolutions
for@mui/*
packages from the other fixtures - Create a template
- Write a factory that fills the template in
test/bundling/scripts/createFixture
- Add an entry into the
bundling
CircleCI pipeline (.circleci/config.yml
)