Skip to content

Commit

Permalink
Merge pull request #26973 from MetaMask/Version-v12.3.0
Browse files Browse the repository at this point in the history
Version v12.3.0
  • Loading branch information
danjm authored Sep 25, 2024
2 parents d6b95fc + 318aaad commit 63a50cc
Show file tree
Hide file tree
Showing 1,058 changed files with 52,744 additions and 21,596 deletions.
186 changes: 102 additions & 84 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ aliases:
workflows:
test_and_release:
when:
not:
matches:
pattern: /^l10n_crowdin_action$/
value: << pipeline.git.branch >>
jobs:
- create_release_pull_request:
<<: *rc_branch_only
Expand Down Expand Up @@ -154,6 +159,9 @@ workflows:
- prep-build-test-mv2:
requires:
- prep-deps
- prep-build-test-webpack:
requires:
- prep-deps
- prep-build-test-flask:
requires:
- prep-deps
Expand Down Expand Up @@ -184,6 +192,10 @@ workflows:
- test-lint-changelog:
requires:
- prep-deps
- test-e2e-chrome-webpack:
requires:
- prep-build-test-webpack
- get-changed-files-with-git-diff
- test-e2e-chrome:
requires:
- prep-build-test
Expand Down Expand Up @@ -230,9 +242,6 @@ workflows:
- /^Version-v(\d+)[.](\d+)[.](\d+)/
requires:
- prep-build
- test-unit-global:
requires:
- prep-deps
- test-storybook:
requires:
- prep-deps
Expand Down Expand Up @@ -273,7 +282,6 @@ workflows:
- test-lint-shellcheck
- test-lint-lockfile
- test-lint-changelog
- test-unit-global
- validate-source-maps
- validate-source-maps-beta
- validate-source-maps-flask
Expand All @@ -288,6 +296,7 @@ workflows:
- test-e2e-chrome-mmi
- test-e2e-chrome-rpc-mmi
- test-e2e-chrome-vault-decryption
- test-e2e-chrome-webpack
- test-storybook
- benchmark:
requires:
Expand Down Expand Up @@ -338,9 +347,30 @@ workflows:
requires:
- prep-build-ts-migration-dashboard

locales_only:
when:
matches:
pattern: /^l10n_crowdin_action$/
value: << pipeline.git.branch >>
jobs:
- prep-deps
- get-changed-files-with-git-diff:
requires:
- prep-deps
- validate-locales-only:
requires:
- get-changed-files-with-git-diff
- test-lint:
requires:
- prep-deps
- all-tests-pass:
requires:
- test-lint
- validate-locales-only

jobs:
trigger-beta-build:
executor: node-browsers-medium-plus
executor: node-browsers-small
steps:
- run: *shallow-git-clone
- run: sudo corepack enable
Expand All @@ -355,8 +385,7 @@ jobs:
steps:
- run:
name: Build beta prod
command: |
.circleci/scripts/trigger-beta-build.sh
command: .circleci/scripts/trigger-beta-build.sh
- run:
name: Move beta build to 'dist-beta' to avoid conflict with production build
command: mv ./dist ./dist-beta
Expand Down Expand Up @@ -429,8 +458,7 @@ jobs:
- run: sudo corepack enable
- run:
name: Save Yarn version
command: |
yarn --version > /tmp/YARN_VERSION
command: yarn --version > /tmp/YARN_VERSION
- restore_cache:
keys:
# First try to get the specific cache for the checksum of the yarn.lock file.
Expand Down Expand Up @@ -476,6 +504,15 @@ jobs:
paths:
- changed-files

validate-locales-only:
executor: node-browsers-small
steps:
- run: *shallow-git-clone
- run: sudo corepack enable
- attach_workspace:
at: .
- run: yarn tsx .circleci/scripts/validate-locales-only.ts

validate-lavamoat-allow-scripts:
executor: node-browsers-small
steps:
Expand Down Expand Up @@ -870,6 +907,26 @@ jobs:
- dist-test-mv2
- builds-test-mv2

prep-build-test-webpack:
executor: node-linux-medium
steps:
- run: *shallow-git-clone
- attach_workspace:
at: .
- run:
name: Activate yarn
command: corepack enable
- run:
name: Build extension for testing
command: yarn build:test:webpack
- run:
name: Move test build to 'dist-test-webpack' to avoid conflict with production build
command: mv ./dist ./dist-test-webpack
- persist_to_workspace:
root: .
paths:
- dist-test-webpack

prep-build-storybook:
executor: node-linux-medium
steps:
Expand Down Expand Up @@ -1011,6 +1068,27 @@ jobs:
name: depcheck
command: yarn depcheck

test-e2e-chrome-webpack:
executor: node-browsers-medium-plus
parallelism: 20
steps:
- run: *shallow-git-clone
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: Move test build to dist
command: mv ./dist-test-webpack ./dist
- run:
name: test:e2e:chrome:webpack
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:webpack
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e

test-api-specs:
executor: node-browsers-medium-plus
steps:
Expand All @@ -1027,8 +1105,7 @@ jobs:
- gh/install
- run:
name: test:api-specs
command: |
timeout 20m yarn test:api-specs --retries 2
command: .circleci/scripts/test-run-e2e.sh yarn test:api-specs
no_output_timeout: 5m
- run:
name: Comment on PR
Expand Down Expand Up @@ -1059,11 +1136,7 @@ jobs:
command: mv ./builds-test ./builds
- run:
name: test:e2e:chrome
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome --retries 1
fi
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1087,11 +1160,7 @@ jobs:
command: mv ./builds-test ./builds
- run:
name: test:e2e:chrome:rpc
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome:rpc --retries 1
fi
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:rpc
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1115,11 +1184,7 @@ jobs:
command: mv ./builds-test ./builds
- run:
name: test:e2e:chrome:multi-provider
command: |
if .circleci/scripts/test-run-e2e.sh
then
yarn test:e2e:chrome:multi-provider --retries 1
fi
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:multi-provider
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1142,11 +1207,7 @@ jobs:
command: mv ./builds-test-mmi ./builds
- run:
name: test:e2e:chrome:rpc
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome:rpc --retries 1 --build-type=mmi
fi
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:rpc --build-type=mmi
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1162,12 +1223,8 @@ jobs:
- attach_workspace:
at: .
- run:
name: test:e2e:chrome:vault
command: |
if .circleci/scripts/test-run-e2e.sh
then
yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome --retries 1
fi
name: test:e2e:single
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:single test/e2e/vault-decryption-chrome.spec.js --browser chrome
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1191,12 +1248,7 @@ jobs:
command: mv ./builds-test-flask-mv2 ./builds
- run:
name: test:e2e:firefox:flask
command: |
export ENABLE_MV3=false
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:firefox:flask --retries 1
fi
command: ENABLE_MV3=false .circleci/scripts/test-run-e2e.sh yarn test:e2e:firefox:flask
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1220,11 +1272,7 @@ jobs:
command: mv ./builds-test-flask ./builds
- run:
name: test:e2e:chrome:flask
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome:flask --retries 1
fi
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:flask
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1248,11 +1296,7 @@ jobs:
command: mv ./builds-test-mmi ./builds
- run:
name: test:e2e:chrome:mmi
command: |
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:chrome:mmi --retries 1 --build-type=mmi
fi
command: .circleci/scripts/test-run-e2e.sh yarn test:e2e:chrome:mmi --build-type=mmi
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand All @@ -1274,8 +1318,7 @@ jobs:
command: mv ./dist-test-mmi-playwright ./dist
- run:
name: Install chromium
command: |
yarn playwright install chromium
command: yarn playwright install chromium
- run:
name: test:e2e:chrome:mmi
command: |
Expand Down Expand Up @@ -1312,8 +1355,7 @@ jobs:
at: .
- run:
name: Install chromium
command: |
yarn playwright install chromium
command: yarn playwright install chromium
- run:
name: test:e2e:chrome:swap
command: |
Expand Down Expand Up @@ -1349,12 +1391,7 @@ jobs:
command: mv ./builds-test-mv2 ./builds
- run:
name: test:e2e:firefox
command: |
export ENABLE_MV3=false
if .circleci/scripts/test-run-e2e.sh
then
timeout 20m yarn test:e2e:firefox --retries 1
fi
command: ENABLE_MV3=false .circleci/scripts/test-run-e2e.sh yarn test:e2e:firefox
no_output_timeout: 5m
- store_artifacts:
path: test-artifacts
Expand Down Expand Up @@ -1510,12 +1547,6 @@ jobs:
command: |
echo "export PARENT_COMMIT=$(git merge-base origin/HEAD HEAD)" >> $BASH_ENV
source $BASH_ENV
- run:
name: Set commit message env var
command: |
commit_title=$(git show -s --format='%s' HEAD)
echo "export SHA1_COMMIT_TITLE=\"$commit_title\"" >> $BASH_ENV
source $BASH_ENV
- run:
name: build:announce
command: ./development/metamaskbot-build-announce.js
Expand Down Expand Up @@ -1544,8 +1575,7 @@ jobs:
command: yarn sentry:publish --build-type mmi
- run:
name: Create GitHub release
command: |
.circleci/scripts/release-create-gh-release.sh
command: .circleci/scripts/release-create-gh-release.sh

job-publish-storybook:
executor: node-browsers-small
Expand Down Expand Up @@ -1581,17 +1611,6 @@ jobs:
git config user.email metamaskbot@users.noreply.github.com
yarn ts-migration:dashboard:deploy
test-unit-global:
executor: node-browsers-small
steps:
- run: *shallow-git-clone
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: test:unit:global
command: yarn test:unit:global

validate-source-maps:
executor: node-browsers-small
steps:
Expand All @@ -1612,8 +1631,7 @@ jobs:
at: .
- run:
name: Validate source maps
command: |
.circleci/scripts/validate-source-maps-beta.sh
command: .circleci/scripts/validate-source-maps-beta.sh

validate-source-maps-mmi:
executor: node-browsers-small
Expand Down
2 changes: 1 addition & 1 deletion .circleci/scripts/git-diff-develop.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ async function storeGitDiffOutput() {

// Store the output of git diff
const outputPath = path.resolve(outputDir, 'changed-files.txt');
fs.writeFileSync(outputPath, diffOutput);
fs.writeFileSync(outputPath, diffOutput.trim());

console.log(`Git diff results saved to ${outputPath}`);
process.exit(0);
Expand Down
Loading

0 comments on commit 63a50cc

Please sign in to comment.