Skip to content

Commit

Permalink
fix: fix metamask updates (#163)
Browse files Browse the repository at this point in the history
* fix: fix metamask updates

- pin rollup-plugin to 3.0.0
- remove mm cli and just use sirv to serve the snap
- fix all the new types and ui coming from the sdk package

* chore: lock

* chore: depcheck

* chore: lock again

* fix: remove web3.storage and gh token

* chore: remove ts config leftover
  • Loading branch information
hugomrdias committed Mar 4, 2024
1 parent e3ba5bd commit 4aa9642
Show file tree
Hide file tree
Showing 29 changed files with 2,984 additions and 4,877 deletions.
38 changes: 9 additions & 29 deletions .github/workflows/adapter-react.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:
- master
paths:
- 'packages/adapter-react/**'
- '.github/workflows/adapter-react.yml'
- 'pnpm-lock.yaml'
- .github/workflows/adapter-react.yml
- pnpm-lock.yaml
pull_request:
paths:
- 'packages/adapter-react/**'
- '.github/workflows/adapter-react.yml'
- 'pnpm-lock.yaml'
- .github/workflows/adapter-react.yml
- pnpm-lock.yaml
jobs:
test:
timeout-minutes: 60
Expand All @@ -23,13 +23,13 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
version: latest
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
node-version: lts/*
cache: pnpm
- run: pnpm install
- run: pnpm -r --filter filsnap-adapter-react run lint
- run: pnpm -r --filter filsnap-adapter-react exec depcheck
Expand All @@ -43,23 +43,3 @@ jobs:
name: playwright-report
path: packages/snap/playwright-report/
retention-days: 30
- name: Check for playwright-report
id: check_report
if: always()
uses: andstor/file-existence-action@v2
with:
files: packages/snap/playwright-report
- name: Add report to web3.storage
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
uses: web3-storage/add-to-web3@v2
id: add_to_web3_storage
with:
path_to_add: packages/snap/playwright-report
web3_token: ${{ secrets.WEB3_TOKEN }}
- name: Add url to GITHUB_STEP_SUMMARY
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
run: |
echo "
### Adapter Tests failed 🤷🏻‍♂️
Check report and traces: https://w3s.link/ipfs/${{ steps.add_to_web3_storage.outputs.cid }}
" >> $GITHUB_STEP_SUMMARY
38 changes: 9 additions & 29 deletions .github/workflows/adapter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ on:
- master
paths:
- 'packages/adapter/**'
- '.github/workflows/adapter.yml'
- 'pnpm-lock.yaml'
- .github/workflows/adapter.yml
- pnpm-lock.yaml
pull_request:
paths:
- 'packages/adapter/**'
- '.github/workflows/adapter.yml'
- 'pnpm-lock.yaml'
- .github/workflows/adapter.yml
- pnpm-lock.yaml
jobs:
test:
timeout-minutes: 60
Expand All @@ -24,13 +24,13 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
version: latest
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
node-version: lts/*
cache: pnpm
- run: pnpm install
- run: pnpm --filter filsnap-adapter exec playwright install --with-deps chromium
- run: pnpm -r --filter filsnap-adapter run lint
Expand All @@ -45,23 +45,3 @@ jobs:
name: playwright-report
path: packages/snap/playwright-report/
retention-days: 30
- name: Check for playwright-report
id: check_report
if: always()
uses: andstor/file-existence-action@v2
with:
files: packages/snap/playwright-report
- name: Add report to web3.storage
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
uses: web3-storage/add-to-web3@v2
id: add_to_web3_storage
with:
path_to_add: packages/snap/playwright-report
web3_token: ${{ secrets.WEB3_TOKEN }}
- name: Add url to GITHUB_STEP_SUMMARY
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
run: |
echo "
### Adapter Tests failed 🤷🏻‍♂️
Check report and traces: https://w3s.link/ipfs/${{ steps.add_to_web3_storage.outputs.cid }}
" >> $GITHUB_STEP_SUMMARY
38 changes: 9 additions & 29 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,26 @@ on:
metamask-tag:
description: 'Metamask tag to download. ie. "v10.27.0"'
metamask-seed:
description: 'Seed to use for Metamask'
description: Seed to use for Metamask
metamask-password:
description: 'Password to use for Metamask'
description: Password to use for Metamask
metamask-snap-id:
description: 'Snap ID to install in Metamask. ie. "npm:filsnap"'
metamask-snap-version:
description: 'Snap Version to install Metamask'
description: Snap Version to install Metamask
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
version: latest
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
node-version: lts/*
cache: pnpm
- run: pnpm install
- run: pnpm --filter filsnap exec playwright install --with-deps chromium
- run: pnpm -r --filter filsnap run test
Expand All @@ -48,32 +48,12 @@ jobs:
name: playwright-report
path: packages/snap/playwright-report/
retention-days: 30
- name: Check for playwright-report
id: check_report
if: always()
uses: andstor/file-existence-action@v2
with:
files: packages/snap/playwright-report
- name: Add report to web3.storage
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
uses: web3-storage/add-to-web3@v2
id: add_to_web3_storage
with:
path_to_add: packages/snap/playwright-report
web3_token: ${{ secrets.WEB3_TOKEN }}
- name: Add url to GITHUB_STEP_SUMMARY
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
run: |
echo "
### Snap Tests failed 🤷🏻‍♂️
Check report and traces: https://w3s.link/ipfs/${{ steps.add_to_web3_storage.outputs.cid }}
" >> $GITHUB_STEP_SUMMARY
- name: Notify Slack
if: always() && github.event_name == 'schedule' && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: 'failure'
notify_when: failure
token: ${{ secrets.GITHUB_TOKEN }}
notification_title: 'Filsnap tests {status_message}!'
message_format: '{emoji} *<{workflow_url}|{workflow}>* workflow {status_message} in the <{run_url}|{job}> job.'
Expand Down
46 changes: 6 additions & 40 deletions .github/workflows/publish-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ jobs:
if: github.ref_name == 'master'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
version: latest
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
node-version: lts/*
cache: pnpm
- run: pnpm install
- run: pnpm -r --filter demo run build
env:
Expand All @@ -24,44 +24,10 @@ jobs:
id: fission
with:
machine_key: ${{ secrets.FISSION_MACHINE_KEY }}
workdir: 'examples/demo'
workdir: examples/demo
- name: Add url to GITHUB_STEP_SUMMARY
run: |
echo "
### App URL 🌐
https://dweb.link/ipfs/${{ steps.fission.outputs.app_cid }}
" >> $GITHUB_STEP_SUMMARY
preview:
runs-on: ubuntu-latest
if: github.ref_name != 'master' && github.actor != 'dependabot[bot]'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
with:
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
- run: pnpm install
- run: pnpm -r --filter demo run build
env:
GITHUB_WORKFLOW_ID: ${{ github.run_id }}
- name: Add report to web3.storage
uses: web3-storage/add-to-web3@v2
id: add_to_web3_storage
with:
path_to_add: examples/demo/dist
web3_token: ${{ secrets.WEB3_TOKEN }}
- name: Add url to GITHUB_STEP_SUMMARY
run: |
echo "
### Preview URL 🌐
${{ steps.add_to_web3_storage.outputs.url }}
" >> $GITHUB_STEP_SUMMARY
- uses: mshick/add-pr-comment@v2
with:
message-id: 'preview-url'
message: |
### Preview URL 🌐
${{ steps.add_to_web3_storage.outputs.url }}
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
- uses: google-github-actions/release-please-action@v3
id: release
with:
token: ${{ secrets.GH_TOKEN }}
command: manifest
config-file: .github/release-please-config.json
manifest-file: .github/release-please-manifest.json
Expand All @@ -33,14 +32,14 @@ jobs:
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
version: latest
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache: pnpm
- run: pnpm install
- run: pnpm run lint
- run: pnpm run build
Expand All @@ -53,4 +52,4 @@ jobs:
contains(fromJson(needs.release.outputs.paths_released), 'packages/snap') ||
contains(fromJson(needs.release.outputs.paths_released), 'packages/adapter')||
contains(fromJson(needs.release.outputs.paths_released), 'packages/adapter-react')
uses: './.github/workflows/reusable-docs.yml'
uses: ./.github/workflows/reusable-docs.yml
14 changes: 7 additions & 7 deletions .github/workflows/reusable-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
group: pages
cancel-in-progress: false
permissions:
contents: read
Expand All @@ -20,21 +20,21 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
version: latest
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache: pnpm
- run: pnpm install
- run: pnpm run lint
- run: pnpm run docs
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v2
with:
path: './docs'
path: ./docs
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
42 changes: 10 additions & 32 deletions .github/workflows/snap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ on:
- master
paths:
- 'packages/snap/**'
- '.github/workflows/snap.yml'
- 'pnpm-lock.yaml'
- .github/workflows/snap.yml
- pnpm-lock.yaml
pull_request:
paths:
- 'packages/snap/**'
- '.github/workflows/snap.yml'
- 'pnpm-lock.yaml'
- .github/workflows/snap.yml
- pnpm-lock.yaml
jobs:
test:
timeout-minutes: 60
Expand All @@ -24,44 +24,22 @@ jobs:
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2.4.0
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v3
version: latest
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
node-version: lts/*
cache: pnpm
- run: pnpm install
- run: pnpm --filter filsnap exec playwright install --with-deps chromium
- run: pnpm -r --filter filsnap run lint
- run: pnpm -r --filter filsnap exec depcheck
- run: pnpm -r --filter filsnap run test
id: tests
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: packages/snap/playwright-report/
retention-days: 30
- name: Check for playwright-report
id: check_report
if: always()
uses: andstor/file-existence-action@v2
with:
files: packages/snap/playwright-report
- name: Add report to web3.storage
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
uses: web3-storage/add-to-web3@v2
id: add_to_web3_storage
with:
path_to_add: packages/snap/playwright-report
web3_token: ${{ secrets.WEB3_TOKEN }}
- name: Add url to GITHUB_STEP_SUMMARY
if: always() && steps.check_report.outputs.files_exists == 'true' && steps.tests.outcome != 'success'
run: |
echo "
### Snap Tests failed 🤷🏻‍♂️
Check report and traces: https://w3s.link/ipfs/${{ steps.add_to_web3_storage.outputs.cid }}
" >> $GITHUB_STEP_SUMMARY

0 comments on commit 4aa9642

Please sign in to comment.