Skip to content

Commit

Permalink
ci: update actions, dependabot config, and internal dependencies (#43)
Browse files Browse the repository at this point in the history
The current Dependabot configuration is not working. This change copies
the configuration from [MetaMask/core](https://github.com/MetaMask/core)
to attempt to fix the issue.

It also updates some actions and adds the `--immutable-cache` flag to
some `yarn install` invocations.

The `@metamask/keyring-api` dependency used by
`@metamask/eth-snap-keyring` is moved to `peerDependencies` and bumped
to 8.1.1.
  • Loading branch information
danroc authored Sep 19, 2024
1 parent 79f969b commit c9f8656
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 34 deletions.
9 changes: 1 addition & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'
time: '06:00'
allow:
- dependency-name: '@metamask/*'
target-branch: 'main'
versioning-strategy: 'increase'
open-pull-requests-limit: 10
groups:
snaps:
patterns:
- '@metamask/snaps-*'
34 changes: 14 additions & 20 deletions .github/workflows/build-lint-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Yarn
run: corepack enable
- name: Restore Yarn cache
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --immutable
- run: yarn install --immutable
- name: Fetch workspace package names
id: workspace-package-names
run: |
Expand All @@ -41,13 +35,13 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable
cache: yarn
- run: yarn install --immutable --immutable-cache
- run: yarn lint
- name: Require clean working directory
shell: bash
Expand Down Expand Up @@ -78,7 +72,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn --immutable
- run: yarn install --immutable --immutable-cache
- run: yarn workspace ${{ matrix.package-name }} changelog:validate
- name: Require clean working directory
shell: bash
Expand All @@ -97,13 +91,13 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable
cache: yarn
- run: yarn install --immutable --immutable-cache
- run: yarn build
- name: Require clean working directory
shell: bash
Expand All @@ -122,13 +116,13 @@ jobs:
matrix:
node-version: [18.x, 20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn --immutable
cache: yarn
- run: yarn install --immutable --immutable-cache
- run: yarn build
- run: yarn test
- name: Require clean working directory
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: Check workflows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- 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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
node-version-file: '.nvmrc'
cache: yarn
- run: yarn --immutable
- run: yarn install --immutable --immutable-cache
- name: Get commit SHA
id: commit-sha
run: echo "COMMIT_SHA=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: MetaMask/action-publish-release@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: yarn --immutable
- run: yarn install --immutable --immutable-cache
- run: yarn build

publish-npm-dry-run:
Expand Down
4 changes: 3 additions & 1 deletion packages/keyring-snap-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"dependencies": {
"@ethereumjs/tx": "^4.2.0",
"@metamask/eth-sig-util": "^7.0.3",
"@metamask/keyring-api": "^8.1.0",
"@metamask/snaps-controllers": "^9.6.0",
"@metamask/snaps-sdk": "^6.4.0",
"@metamask/snaps-utils": "^7.8.0",
Expand All @@ -51,6 +50,9 @@
"typedoc": "^0.23.15",
"typescript": "~4.8.4"
},
"peerDependencies": {
"@metamask/keyring-api": "^8.1.1"
},
"engines": {
"node": "^18.18 || >=20"
},
Expand Down
5 changes: 3 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2027,7 +2027,6 @@ __metadata:
"@lavamoat/allow-scripts": "npm:^3.0.4"
"@metamask/auto-changelog": "npm:^3.4.4"
"@metamask/eth-sig-util": "npm:^7.0.3"
"@metamask/keyring-api": "npm:^8.1.0"
"@metamask/snaps-controllers": "npm:^9.6.0"
"@metamask/snaps-sdk": "npm:^6.4.0"
"@metamask/snaps-utils": "npm:^7.8.0"
Expand All @@ -2046,6 +2045,8 @@ __metadata:
typedoc: "npm:^0.23.15"
typescript: "npm:~4.8.4"
uuid: "npm:^9.0.0"
peerDependencies:
"@metamask/keyring-api": ^8.1.1
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2131,7 +2132,7 @@ __metadata:
languageName: node
linkType: hard

"@metamask/keyring-api@npm:^8.1.0, @metamask/keyring-api@workspace:packages/keyring-api":
"@metamask/keyring-api@workspace:packages/keyring-api":
version: 0.0.0-use.local
resolution: "@metamask/keyring-api@workspace:packages/keyring-api"
dependencies:
Expand Down

0 comments on commit c9f8656

Please sign in to comment.