Skip to content

Commit

Permalink
Merge branch 'develop' into fix/use-counter-pending-transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
matteoscurati authored Aug 1, 2024
2 parents 7a83fcb + 728b0e4 commit 634bec5
Show file tree
Hide file tree
Showing 224 changed files with 15,466 additions and 2,167 deletions.
19 changes: 2 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,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 @@ -282,7 +279,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 Down Expand Up @@ -400,9 +396,9 @@ jobs:
- builds-beta

create_release_pull_request:
executor: node-browsers-small
executor: node-browsers-medium
steps:
- run: *shallow-git-clone
- checkout
- run: sudo corepack enable
- attach_workspace:
at: .
Expand Down Expand Up @@ -1607,17 +1603,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 Down
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ module.exports = {
* Mocha library.
*/
{
files: ['test/e2e/**/*.spec.js', 'test/unit-global/*.test.js'],
files: ['test/e2e/**/*.spec.js'],
extends: ['@metamask/eslint-config-mocha'],
rules: {
// In Mocha tests, it is common to use `this` to store values or do
Expand Down Expand Up @@ -299,6 +299,7 @@ module.exports = {
'test/jest/*.js',
'test/lib/timer-helpers.js',
'test/e2e/helpers.test.js',
'test/unit-global/*.test.js',
'ui/**/*.test.js',
'ui/__mocks__/*.js',
'shared/lib/error-utils.test.js',
Expand Down Expand Up @@ -367,7 +368,6 @@ module.exports = {
'development/**/*.js',
'test/e2e/benchmark.js',
'test/helpers/setup-helper.js',
'test/run-unit-tests.js',
],
rules: {
'node/no-process-exit': 'off',
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/add-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,13 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- run: corepack enable
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # This is needed to checkout all branches

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
fetch-depth: 0 # This is needed to checkout all branches

- name: Install dependencies
run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Get the next semver version
id: get-next-semver-version
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/check-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies from cache
run: yarn --immutable

- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Check attributions changes
run: yarn attributions:check
21 changes: 3 additions & 18 deletions .github/workflows/check-pr-labels.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Check PR has required labels'
name: Check PR has required labels
on:
pull_request:
branches:
Expand All @@ -17,28 +17,13 @@ jobs:
pull-requests: read

steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # This retrieves only the latest commit.

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Check PR has required labels
id: check-pr-has-required-labels
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn run check-pr-has-required-labels
18 changes: 2 additions & 16 deletions .github/workflows/check-template-and-add-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,11 @@ jobs:
check-template-and-add-labels:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # This retrieves only the latest commit.

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Check template and add labels
id: check-template-and-add-labels
Expand Down
19 changes: 2 additions & 17 deletions .github/workflows/close-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,13 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'Version-v')
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # This retrieves only the latest commit.

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Close release bug report issue
id: close-release-bug-report-issue
env:
BUG_REPORT_REPO: MetaMask-planning
BUG_REPORT_TOKEN: ${{ secrets.BUG_REPORT_TOKEN }}
Expand Down
17 changes: 2 additions & 15 deletions .github/workflows/codespaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,8 @@ jobs:
name: Generate cache image
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1 # This retrieves only the latest commit.

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'

- run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main
18 changes: 3 additions & 15 deletions .github/workflows/fitness-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable

- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn
fetch-depth: 0 # This is needed to checkout all branches

- name: Install dependencies
run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Run fitness functions
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Download actionlint
id: download-actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.23
shell: bash

- name: Check workflow files
run: ${{ steps.download-actionlint.outputs.executable }} -color
shell: bash
Expand Down
20 changes: 4 additions & 16 deletions .github/workflows/update-attributions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main
- name: Get commit SHA
id: commit-sha
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
Expand All @@ -86,14 +80,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies from cache
run: yarn --immutable --immutable-cache
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main
- name: Generate Attributions
run: yarn attributions:generate
- name: Cache attributions file
Expand Down
42 changes: 6 additions & 36 deletions .github/workflows/update-lavamoat-policies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,15 @@ jobs:
outputs:
COMMIT_SHA: ${{ steps.commit-sha.outputs.COMMIT_SHA }}
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout pull request
run: gh pr checkout "${PR_NUMBER}"
env:
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn --immutable
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main
- name: Get commit SHA
id: commit-sha
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
Expand All @@ -80,25 +70,15 @@ jobs:
needs:
- prepare
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout pull request
run: gh pr checkout "${PR_NUMBER}"
env:
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies from cache
run: yarn --immutable --immutable-cache
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main
- name: Update LavaMoat build policy
run: yarn lavamoat:build:auto
- name: Cache build policy
Expand All @@ -119,25 +99,15 @@ jobs:
- prepare
- update-lavamoat-build-policy
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: corepack enable
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout pull request
run: gh pr checkout "${PR_NUMBER}"
env:
GITHUB_TOKEN: ${{ secrets.LAVAMOAT_UPDATE_TOKEN }}
PR_NUMBER: ${{ github.event.issue.number }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies from cache
run: yarn --immutable --immutable-cache
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main
- name: Restore build policy
uses: actions/cache/restore@v3
with:
Expand Down
Loading

0 comments on commit 634bec5

Please sign in to comment.