The CI job `test-deps-depcheck` was optional, allowing PRs to be merged
that included dependency errors. It is now a required job, ensuring
that no such errors are introduced in the future.
* Enable Snaps feature flag in stable
* Run snaps E2Es in stable
* Fix CI config indentation
* Fix CI paths
* Update LavaMoat policies
* Update iframe URL
* Exclude some tests from running in stable e2e
* Disable another test on stable
* Bump to 1.0.1
* Fix config.yml issue due to staleness
* Stop running newly added test
* Update snapshots used for E2E
* Use shallow-git-clone
The CI job `prep-deps` was broken in #20096 for forks and non-PR builds
(e.g. the `develop` branch builds). Non-PR builds were broken because
of the `set -u` flag, which complained about a PR-specific environment
variable being unset. Fork builds were broken because the draft check
relied upon secrets (which aren't included in CI runs on forks).
The script is now tolerant of missing environment variables, and skips
the draft check for forks.
* eth_call test
* eth_chainId test
* run json rpc tests
* add ci job
* remove query string param from url
* eth_sendTransaction test
* eth_sendTransaction test
---------
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
Certain draft PRs that add new dependencies have been failing because
CI will try to use the GitHub npm registry, which we use for preview
builds. This registry does not have non-preview package versions, so
the installation will fail if new non-preview dependencies are needed.
CI has been updated to only use the GitHub npm registry when preview
builds are detected in the manifest.
Preview builds were setup to install correctly on CircleCI prior to
the Yarn v3 upgrade, but that integration broke with that upgrade. The
Yarn and CircleCI configuration has been updated to fix this.
The `.yarnrc.yaml` file has been updated to configure the GitHub
registry but leave it disabled by default. It can be enabled
dynamically using an environment variable. This lets us switch between
registries without updating the file.
The new workflow is documented here: https://github.com/MetaMask/core/pull/1481
The `--frozen-lockfile` flag is not supported by Yarn v3. It has been
replaced by the Yarn v3 equivalent, which is `--immutable`.
Additionally, the `deps-install` script was deleted and this command
was inlined in the CircleCI configuration. I don't think we need to
maintain a separate script just for one command.
* Validate LavaMoat policies on each PR
The LavaMoat policies are now validated on every PR. This makes it
easier to validate policy changes, as they should always correspond
with the changes made in the PR (unlike today, when they could be due
to a change in platform or a previous PR).
Closes#19680
* Update LavaMoat policies
---------
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
The LavaMoat policies and allow-scripts configuration are now validated
in parallel. They are still only validated for release candidate
branches and the `master` branch.
E2E tests will now run in debug mode on CI, printing out each step that
the driver takes during a test. This should make debugging intermittent
failures much easier.
* devDeps: pin @babel/core and @babel/runtime in resulotions
Without this: misses patch, lavamoat error
* storybook 6 to 7 migration
* devDeps: add @storybook/addon-mdx-gfm
* fix lint deps
* devDeps: remove unused require-from-string
* devDeps/resolutions: @types/react@^16.9.53
* devDeps: add @storybook/cli
* storybook: new-frameworks migration
* iyarc: remove resolved dependency advisory
* deps: set globalthis@1.0.1 in resolutions
This is required since a file is copied over from a set path in the dist
package subdirectory as of d13aabde23 (#10014).
A future update should either vendor the shim, or update to
compatibility with a maintained upstream version.
* mdx2 migration fixes
* chore: bump ljharb packages
* devDeps: @storybook/*@^7.0.10->^7.0.11
* storybook: update preview.js to use v7 addon api
* ci/test/storybook: echo between storybook build&test
* ci/circleci: resources tweak
* info-tab: handle undefined global.platform
* update lavamoat build policy
* update lavamoat browserify policies
* Bump Circle CI docker image
* Stop removing FF since it doesn't exist
* Use Circle CI browser tools
* Fix config name
* Fix browser tools args
* Fix Chrome version
* Use script for chrome
* Try update
* Try FF without browser-tools2
* Fix FF binary path
* Force enable e2e debug
* Add some logs
* More logs
* Disable XSET check for now
* Delete x-server logic
* remove another usage of the x-server logic
* Build beta with mv3 enabled
* Ensure firefox manifest is an mv2 version
* Revert "Ensure firefox manifest is an mv2 version"
This reverts commit fed74792b0fec33c3a85f2229eb560559d37afe5.
* Only create beta builds for the chrome platform
* Stop linting firefox for beta
* NFTs: Remove feature flag for release
* Update security tab jest test
* Fix broken test
* Update snapshot
* Update test
* Fix test
* Remove last usages of flag
* Update CI jobs
* Fix jest tests
* feat(17494): test separate commit triggered build
* feat(17493): keep consistent commit message
* feat(17493): use trim to get rid of white space in branch name
* feat(17493): bring back some pipelines
* Version v10.25.0-beta.0
* ERC1155 Import & Dapp interaction E2E tests (#17885)
* feat(17494): test separate commit triggered build
* feat(17493): remove testing beta commit in package.json
---------
Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com>
The Playwright install step run in the `test-storybook` job has been
updated to ensure that we are running the correct install command.
Previously we were using `yarn dlx`, which would use the latest version
of `Playwright` rather than the one currently installed. Instead now we
are using `yarn exec`, which will invoke the `playwright` binary from
the locally installed package. This binary has an `install` command
that completes the necessary setup, which is to install custom patched
browsers for Playwright to run.
* added storybook test runner
* added test runner in ci
* updated test for ci and fixed lint error
* updated lavamoat policy
* updated test command
* updated playwright
* changed command to storybook;ci
* updated command
* updated instance for test-storybook
* updated playwright
* added playwright step
* replaced concurrently with start-server-and-test
* updated the static storybook directory
* replaced first with last
* updated lock file
* replaced first with last
* updated test-storybook with maxworkers
* updated .depchechrc
* updated yml
* removed id from banner base
* replaced broken stories with .stories-to-do.js extesnsion
* updated token allowance story
* removed duplicacies from yarn
* fixed lavamoat
* removed filename comment
* updated links for docs
* fixed file extension for stories
* updated path for stories.json
* updated stories.json path
* yarn updated
* updated stories
* updated yarn
* updated wait on
* First e2e mv3 specific dapp testcase
* Fix testpath for snaps
* Update `it` description
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* e2e test paths improvement
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Migrate to new controller packages
`@metamask/controllers` is deprecated, and most of the controllers that
lived here are now located in their own package ([1]). This commit
replaces `@metamask/controllers` in `package.json` with references to
these packages and updates `import` lines to match.
[1]: https://github.com/MetaMask/controllers/pull/831
* Support GitHub registry for draft PRs (#16549)
* Add additional allowed host to lockfile linter
* Update LavaMoat policies
* Add policy exception for nanoid
* Add additional nanoid overrides
* Update LavaMoat policies again
* Bump controller packages
* Update lavamoat
* Bump controller packages
* Update packages to v1.0.0
* Expand gitignore comment
* Unpin controller dependencies, using ^ range instead
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
The bundle size diff message is using the wrong point of comparision,
leading to misleading results on feature branches that have been
merged with `develop` since they were created.
When this feature was introduced, we went back and forth a few times on
what we should be comparing the branch with to get an accurate bundle
size comparison.
The first attempt used `develop` as the point of comparison, but that
didn't work because it was a moving target, and because it didn't
reflect the changes made on this branch. As bundle increases or
decreases were added on `develop`, they would alter the diff on each
feature PR.
Then we chose to use the fork-point of the branch, the commit of
`develop` that the branch forked off of. This works for feature
branches that don't merge in `develop`. But the minute `develop` gets
merged in, then unrelated changes on `develop` affect the measurement.
The _most recent_ commit from `develop` on the current branch is a
better comparison. Any difference between this commit and the feature
branch in terms of bundle size would be attributable to the feature
branch changes. This is what `merge-base` gives us.
* Ensure prod beta build is created when merging to master
* Fix: remove negation
* Update .circleci/config.yml
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>