Skip to content

Commit

Permalink
Merge branch 'master' into add-key
Browse files Browse the repository at this point in the history
  • Loading branch information
sai6855 committed Aug 23, 2024
2 parents bc0c5ac + 45b2835 commit 54252b9
Show file tree
Hide file tree
Showing 1,975 changed files with 92,364 additions and 25,925 deletions.
90 changes: 68 additions & 22 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ parameters:
description: Whether to force browserstack usage. We have limited resources on browserstack so the pipeline might decide to skip browserstack if this parameter isn't set to true.
type: boolean
default: false
react-dist-tag:
description: The dist-tag of react to be used
react-version:
description: The version of react to be used
type: string
default: stable
workflow:
Expand All @@ -20,10 +20,10 @@ parameters:

default-job: &default-job
parameters:
react-dist-tag:
description: The dist-tag of react to be used
react-version:
description: The version of react to be used
type: string
default: << pipeline.parameters.react-dist-tag >>
default: << pipeline.parameters.react-version >>
e2e-base-url:
description: The base url for running end-to-end test
type: string
Expand All @@ -33,7 +33,7 @@ default-job: &default-job
PLAYWRIGHT_BROWSERS_PATH: /tmp/pw-browsers
# expose it globally otherwise we have to thread it from each job to the install command
BROWSERSTACK_FORCE: << pipeline.parameters.browserstack-force >>
REACT_DIST_TAG: << parameters.react-dist-tag >>
REACT_VERSION: << parameters.react-version >>
working_directory: /tmp/mui
docker:
- image: cimg/node:18.20
Expand Down Expand Up @@ -66,7 +66,6 @@ commands:
name: Install pnpm package manager
command: |
corepack enable
corepack prepare pnpm@latest-8 --activate
- run:
name: Prepare playwright hash
command: pnpm list --json --filter playwright > /tmp/playwright_info.json
Expand All @@ -92,6 +91,14 @@ commands:
- run:
name: Install js dependencies
command: pnpm install

- run:
name: Resolve React version
command: |
pnpm use-react-version
# log a patch for maintainers who want to check out this change
git --no-pager diff HEAD
- when:
condition: << parameters.browsers >>
steps:
Expand All @@ -116,9 +123,10 @@ jobs:
name: Should not have any git not staged
command: git add -A && git diff --exit-code --staged
- run:
name: Check for duplicated packages
name: '`pnpm dedupe` was run?'
command: |
if [[ $(git diff --name-status next | grep pnpm-lock) == "" ]];
# #default-branch-switch
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
echo "No changes to dependencies detected. Skipping..."
else
Expand All @@ -129,9 +137,6 @@ jobs:
steps:
- checkout
- install_js
- run:
name: Tests charts
command: pnpm test:charts:unit # Run special test for charts due to ESM compatibility issue
- run:
name: Tests fake browser
command: pnpm test:coverage
Expand All @@ -147,7 +152,7 @@ jobs:
command: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_DIST_TAG-jsdom"
./codecov -t ${CODECOV_TOKEN} -Z -F "$REACT_VERSION-jsdom"
test_lint:
<<: *default-job
steps:
Expand All @@ -169,7 +174,14 @@ jobs:
- install_js
- run:
name: '`pnpm prettier` changes committed?'
command: pnpm prettier --check
command: |
# #default-branch-switch
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
pnpm prettier --check
else
pnpm prettier:check
fi
- run:
name: Generate PropTypes
command: pnpm proptypes
Expand Down Expand Up @@ -197,6 +209,18 @@ jobs:
command: |
pnpm docs:link-check
git add -A && git diff --exit-code --staged
- run:
name: '`pnpm @mui/x-charts-vendor build` was run?'
command: |
# #default-branch-switch
if [[ $(git diff --name-status master | grep pnpm-lock) == "" ]];
then
echo "No changes to dependencies detected. Skipping..."
else
pnpm --filter @mui/x-charts-vendor build
git add -A && git diff --exit-code --staged
fi
test_browser:
<<: *default-job
docker:
Expand Down Expand Up @@ -229,7 +253,7 @@ jobs:
name: Tests TypeScript definitions
command: pnpm typescript:ci
environment:
NODE_OPTIONS: --max-old-space-size=1536
NODE_OPTIONS: --max-old-space-size=3584
test_e2e:
<<: *default-job
docker:
Expand Down Expand Up @@ -276,15 +300,9 @@ jobs:
command: pnpm test:argos
run_danger:
<<: *default-job
docker:
- image: mcr.microsoft.com/playwright:v1.44.1-focal
environment:
NODE_ENV: development # Needed if playwright is in `devDependencies`
steps:
- checkout
- install_js:
# TODO remove, no needed
browsers: true
- install_js
- run:
name: Run danger on PRs
command: pnpm danger ci --fail-on-errors
Expand Down Expand Up @@ -337,3 +355,31 @@ workflows:
- test_e2e_website:
requires:
- checkout

react-next:
when:
equal: [react-next, << pipeline.parameters.workflow >>]
# triggers:
# - schedule:
# cron: '0 0 * * *'
# filters:
# branches:
# only:
# - master
jobs:
- test_unit:
<<: *default-context
react-version: next
name: test_unit-react@next
- test_browser:
<<: *default-context
react-version: next
name: test_browser-react@next
- test_regressions:
<<: *default-context
react-version: next
name: test_regressions-react@next
- test_e2e:
<<: *default-context
react-version: next
name: test_e2e-react@next
9 changes: 6 additions & 3 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"packages/x-date-pickers",
"packages/x-date-pickers-pro",
"packages/x-charts",
"packages/x-charts-pro",
"packages/x-tree-view"
"packages/x-charts-vendor",
"packages/x-tree-view",
"packages/x-internals"
],
"publishDirectory": {
"@mui/x-license": "packages/x-license/build",
Expand All @@ -23,9 +24,11 @@
"@mui/x-date-pickers": "packages/x-date-pickers/build",
"@mui/x-date-pickers-pro": "packages/x-date-pickers-pro/build",
"@mui/x-charts": "packages/x-charts/build",
"@mui/x-charts-vendor": "packages/x-charts-vendor",
"@mui/x-charts-pro": "packages/x-charts-pro/build",
"@mui/x-tree-view": "packages/x-tree-view/build",
"@mui/x-tree-view-pro": "packages/x-tree-view-pro/build"
"@mui/x-tree-view-pro": "packages/x-tree-view-pro/build",
"@mui/x-internals": "packages/x-internals/build"
},
"sandboxes": ["/bug-reproductions/x-data-grid"],
"silent": true
Expand Down
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ netlify/functions
/docs/pages/playground/
/lerna.json
/packages/x-codemod/src/**/*.spec.js
/packages/x-charts-vendor
build
/coverage
CHANGELOG.md
dist
node_modules
Expand Down
Loading

0 comments on commit 54252b9

Please sign in to comment.