Skip to content

Commit

Permalink
chore: Merge main, address conflicts, update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
gambinish committed Jan 10, 2025
2 parents 2b4d0c1 + b2c5314 commit d54f03f
Show file tree
Hide file tree
Showing 406 changed files with 8,748 additions and 14,819 deletions.
226 changes: 16 additions & 210 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ executors:
resource_class: medium+
environment:
NODE_OPTIONS: --max_old_space_size=4096
shellcheck:
docker:
- image: koalaman/shellcheck-alpine@sha256:dfaf08fab58c158549d3be64fb101c626abc5f16f341b569092577ae207db199
resource_class: small
playwright:
docker:
- image: mcr.microsoft.com/playwright:v1.44.1-focal
Expand Down Expand Up @@ -127,27 +123,6 @@ workflows:
- master
requires:
- prep-deps
- test-deps-audit:
requires:
- prep-deps
- test-deps-depcheck:
requires:
- prep-deps
- test-yarn-dedupe:
requires:
- prep-deps
- validate-lavamoat-allow-scripts:
requires:
- prep-deps
- validate-lavamoat-policy-build:
requires:
- prep-deps
- validate-lavamoat-policy-webapp:
matrix:
parameters:
build-type: [main, beta, flask, mmi]
requires:
- prep-deps
- prep-build-mmi:
requires:
- prep-deps
Expand Down Expand Up @@ -176,7 +151,6 @@ workflows:
requires:
- prep-deps
- prep-build-test-flask-mv2:
<<: *main_master_rc_only
requires:
- prep-deps
- prep-build-test-mmi:
Expand All @@ -193,16 +167,6 @@ workflows:
- prep-build-ts-migration-dashboard:
requires:
- prep-deps
- test-lint:
requires:
- prep-deps
- test-lint-shellcheck
- test-lint-lockfile:
requires:
- prep-deps
- test-lint-changelog:
requires:
- prep-deps
- test-e2e-chrome-webpack:
<<: *main_master_rc_only
requires:
Expand Down Expand Up @@ -291,14 +255,6 @@ workflows:
- prep-build-flask-mv2
- all-tests-pass:
requires:
- test-deps-depcheck
- validate-lavamoat-allow-scripts
- validate-lavamoat-policy-build
- validate-lavamoat-policy-webapp
- test-lint
- test-lint-shellcheck
- test-lint-lockfile
- test-lint-changelog
- validate-source-maps
- validate-source-maps-beta
- validate-source-maps-flask
Expand All @@ -321,23 +277,27 @@ workflows:
- user-actions-benchmark:
requires:
- prep-build-test
- stats-module-load-init:
- bundle-size:
requires:
- prep-build-test
- job-publish-prerelease:
requires:
- prep-deps
- prep-build
- prep-build-mv2
- trigger-beta-build
- prep-build-mmi
- prep-build-flask
- prep-build-flask-mv2
- prep-build-test
- prep-build-test-mv2
- prep-build-test-flask
- prep-build-test-flask-mv2
- trigger-beta-build
- prep-build-storybook
- prep-build-ts-migration-dashboard
- benchmark
- user-actions-benchmark
- stats-module-load-init
- bundle-size
- all-tests-pass
- job-publish-release:
filters:
Expand Down Expand Up @@ -509,51 +469,6 @@ jobs:
at: .
- run: yarn tsx .circleci/scripts/validate-locales-only.ts

validate-lavamoat-allow-scripts:
executor: node-browsers-small
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: Validate allow-scripts config
command: yarn allow-scripts auto
- run:
name: Check working tree
command: .circleci/scripts/check-working-tree.sh

validate-lavamoat-policy-build:
executor: node-browsers-medium
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: Validate LavaMoat build policy
command: yarn lavamoat:build:auto
- run:
name: Check working tree
command: .circleci/scripts/check-working-tree.sh

validate-lavamoat-policy-webapp:
executor: node-browsers-medium-plus
parameters:
build-type:
type: string
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: Validate LavaMoat << parameters.build-type >> policy
command: yarn lavamoat:webapp:auto:ci '--build-types=<< parameters.build-type >>'
- run:
name: Check working tree
command: .circleci/scripts/check-working-tree.sh

prep-build:
executor: node-linux-medium
steps:
Expand Down Expand Up @@ -793,10 +708,10 @@ jobs:
name: Build extension for testing
command: yarn build:test:flask:mv2
- run:
name: Move test build to 'dist-test-flask' to avoid conflict with production build
name: Move test build to 'dist-test-flask-mv2' to avoid conflict with production build
command: mv ./dist ./dist-test-flask-mv2
- run:
name: Move test zips to 'builds-test-flask' to avoid conflict with production build
name: Move test zips to 'builds-test-flask-mv2' to avoid conflict with production build
command: mv ./builds ./builds-test-flask-mv2
- persist_to_workspace:
root: .
Expand Down Expand Up @@ -964,31 +879,6 @@ jobs:
name: Rerun workflows from failed
command: yarn ci-rerun-from-failed

test-yarn-dedupe:
executor: node-browsers-small
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: Detect yarn lock deduplications
command: yarn dedupe --check

test-lint:
executor: node-browsers-medium
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: Lint
command: yarn lint
- run:
name: Verify locales
command: yarn verify-locales --quiet

test-storybook:
executor: node-browsers-medium-plus
steps:
Expand All @@ -1003,78 +893,6 @@ jobs:
name: Test Storybook
command: yarn test-storybook:ci

test-lint-shellcheck:
executor: shellcheck
steps:
- checkout
- run: apk add --no-cache bash jq yarn
- run:
name: ShellCheck Lint
command: ./development/shellcheck.sh

test-lint-lockfile:
executor: node-browsers-medium-plus
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: lockfile-lint
command: yarn lint:lockfile
- run:
name: check yarn resolutions
command: yarn --check-resolutions

test-lint-changelog:
executor: node-browsers-small
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- when:
condition:
not:
matches:
pattern: /^Version-v(\d+)[.](\d+)[.](\d+)$/
value: << pipeline.git.branch >>
steps:
- run:
name: Validate changelog
command: yarn lint:changelog
- when:
condition:
matches:
pattern: /^Version-v(\d+)[.](\d+)[.](\d+)$/
value: << pipeline.git.branch >>
steps:
- run:
name: Validate release candidate changelog
command: .circleci/scripts/validate-changelog-in-rc.sh

test-deps-audit:
executor: node-browsers-small
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: yarn audit
command: yarn audit

test-deps-depcheck:
executor: node-browsers-small
steps:
- run: *shallow-git-clone-and-enable-vnc
- run: sudo corepack enable
- attach_workspace:
at: .
- run:
name: depcheck
command: yarn depcheck

test-e2e-chrome-webpack:
executor: node-browsers-medium-plus
parallelism: 20
Expand Down Expand Up @@ -1456,7 +1274,7 @@ jobs:
paths:
- test-artifacts

stats-module-load-init:
bundle-size:
executor: node-browsers-small
steps:
- run: *shallow-git-clone-and-enable-vnc
Expand All @@ -1470,16 +1288,8 @@ jobs:
name: Move test zips to builds
command: mv ./builds-test ./builds
- run:
name: Run page load benchmark
command: |
mkdir -p test-artifacts/chrome/
cp -R development/charts/flamegraph test-artifacts/chrome/initialisation
cp -R development/charts/flamegraph/chart test-artifacts/chrome/initialisation/background
cp -R development/charts/flamegraph/chart test-artifacts/chrome/initialisation/ui
cp -R development/charts/table test-artifacts/chrome/load_time
- run:
name: Run page load benchmark
command: yarn mv3:stats:chrome --out test-artifacts/chrome
name: Measure bundle size
command: yarn bundle-size --out test-artifacts/chrome
- run:
name: Install jq
command: sudo apt install jq -y
Expand Down Expand Up @@ -1533,8 +1343,12 @@ jobs:
destination: builds-mv2
- store_artifacts:
path: builds-test
- store_artifacts:
path: builds-test-mv2
- store_artifacts:
path: builds-test-flask
- store_artifacts:
path: builds-test-flask-mv2
- store_artifacts:
path: test-artifacts
destination: test-artifacts
Expand All @@ -1551,14 +1365,6 @@ jobs:
- store_artifacts:
path: development/ts-migration-dashboard/build/final
destination: ts-migration-dashboard
- run:
name: Set branch parent commit env var
command: |
echo "export PARENT_COMMIT=$(git merge-base origin/HEAD HEAD)" >> $BASH_ENV
source $BASH_ENV
- run:
name: build:announce
command: ./development/metamaskbot-build-announce.js

job-publish-release:
executor: node-browsers-small
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# audit these changes on their own, and leave their analysis in a comment.
# These codeowners will review this analysis, and review the policy changes in
# further detail if warranted.
lavamoat/ @MetaMask/extension-devs @MetaMask/supply-chain
lavamoat/ @MetaMask/extension-devs @MetaMask/policy-reviewers @MetaMask/supply-chain

# The offscreen.ts script file that is included in the offscreen document html
# file is responsible, at present, for loading the snaps execution environment
Expand Down
Loading

0 comments on commit d54f03f

Please sign in to comment.