-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: migrate storybook to gh actions #29929
Merged
+72
−215
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
f8bf4bb
feat: migrate storybook to gh actions
itsyoboieltr 37ae14b
feat: id-token permission
itsyoboieltr ba01e27
fix: cleanup
itsyoboieltr e040c24
Update main.yml
itsyoboieltr 9ba17d2
feat: remove highlights
itsyoboieltr b787356
fix: deps
itsyoboieltr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,9 +134,6 @@ workflows: | |
- prep-build-test-flask-mv2: | ||
requires: | ||
- prep-deps | ||
- prep-build-storybook: | ||
requires: | ||
- prep-deps | ||
- prep-build-ts-migration-dashboard: | ||
requires: | ||
- prep-deps | ||
|
@@ -185,10 +182,6 @@ workflows: | |
- /^Version-v(\d+)[.](\d+)[.](\d+)/ | ||
requires: | ||
- prep-build | ||
- test-storybook: | ||
requires: | ||
- prep-deps | ||
- prep-build-storybook | ||
- validate-source-maps: | ||
requires: | ||
- prep-build | ||
|
@@ -222,7 +215,6 @@ workflows: | |
- test-e2e-firefox-flask | ||
- test-e2e-chrome-vault-decryption | ||
- test-e2e-chrome-webpack | ||
- test-storybook | ||
- benchmark: | ||
requires: | ||
- prep-build-test | ||
|
@@ -243,7 +235,6 @@ workflows: | |
- prep-build-test-mv2 | ||
- prep-build-test-flask | ||
- prep-build-test-flask-mv2 | ||
- prep-build-storybook | ||
- prep-build-ts-migration-dashboard | ||
- benchmark | ||
- user-actions-benchmark | ||
|
@@ -260,12 +251,6 @@ workflows: | |
- prep-build-flask | ||
- prep-build-flask-mv2 | ||
- all-tests-pass | ||
- job-publish-storybook: | ||
filters: | ||
branches: | ||
only: main | ||
requires: | ||
- prep-build-storybook | ||
- job-publish-ts-migration-dashboard: | ||
filters: | ||
branches: | ||
|
@@ -663,21 +648,6 @@ jobs: | |
paths: | ||
- dist-test-webpack | ||
|
||
prep-build-storybook: | ||
executor: node-linux-medium | ||
steps: | ||
- run: *shallow-git-clone-and-enable-vnc | ||
- run: corepack enable | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Build Storybook | ||
command: yarn storybook:build | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- storybook-build | ||
|
||
prep-build-ts-migration-dashboard: | ||
executor: node-browsers-small | ||
steps: | ||
|
@@ -704,20 +674,6 @@ jobs: | |
name: Rerun workflows from failed | ||
command: yarn ci-rerun-from-failed | ||
|
||
test-storybook: | ||
executor: node-browsers-medium-plus | ||
steps: | ||
- run: *shallow-git-clone-and-enable-vnc | ||
- run: sudo corepack enable | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: Install Playwright browsers | ||
command: yarn exec playwright install chromium | ||
- run: | ||
name: Test Storybook | ||
command: yarn test-storybook:ci | ||
|
||
test-e2e-chrome-webpack: | ||
executor: node-browsers-medium-plus | ||
parallelism: 20 | ||
|
@@ -1085,9 +1041,6 @@ jobs: | |
- store_artifacts: | ||
path: build-artifacts | ||
destination: build-artifacts | ||
- store_artifacts: | ||
path: storybook-build | ||
destination: storybook | ||
- store_artifacts: | ||
path: development/ts-migration-dashboard/build/final | ||
destination: ts-migration-dashboard | ||
|
@@ -1115,22 +1068,6 @@ jobs: | |
name: Create GitHub release | ||
command: .circleci/scripts/release-create-gh-release.sh | ||
|
||
job-publish-storybook: | ||
executor: node-browsers-small | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
- '3d:49:29:f4:b2:e8:ea:af:d1:32:eb:2a:fc:15:85:d8' | ||
- run: *shallow-git-clone-and-enable-vnc | ||
- run: sudo corepack enable | ||
- attach_workspace: | ||
at: . | ||
- run: | ||
name: storybook:deploy | ||
command: | | ||
git remote add storybook [email protected]:MetaMask/metamask-storybook.git | ||
yarn storybook:deploy | ||
|
||
job-publish-ts-migration-dashboard: | ||
executor: node-browsers-small | ||
steps: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build storybook | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-storybook: | ||
name: Build storybook | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
uses: metamask/github-tools/.github/actions/setup-environment@main | ||
|
||
- name: Build storybook | ||
run: yarn storybook:build | ||
|
||
- name: Upload 'storybook-build' to S3 | ||
uses: metamask/github-tools/.github/actions/upload-s3@1233659b3850eb84824d7375e2e0c58eb237701d | ||
with: | ||
aws-region: ${{ vars.AWS_REGION }} | ||
role-to-assume: ${{ vars.AWS_IAM_ROLE }} | ||
s3-bucket: ${{ vars.AWS_S3_BUCKET }}/${{ github.event.repository.name }}/${{ github.run_id }}/storybook-build | ||
path: storybook-build | ||
|
||
- name: Deploy storybook | ||
# For a `pull_request` event, the branch is `github.head_ref``. | ||
# For a `push` event, the branch is `github.ref_name`. | ||
if: ${{ (github.head_ref || github.ref_name) == 'main' }} | ||
run: | | ||
git remote add storybook [email protected]:MetaMask/metamask-storybook.git | ||
yarn storybook:deploy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Test storybook | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
test-storybook: | ||
name: Test storybook | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup environment | ||
uses: metamask/github-tools/.github/actions/setup-environment@main | ||
|
||
- name: Install Playwright browsers | ||
run: yarn exec playwright install chromium | ||
|
||
- name: Test Storybook | ||
run: yarn test-storybook:ci |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we test deployment too? not entirely sure if it is safe to run it randomly for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its probably okay to merge without, as long as we know about when it will be merged in so we can revert quickly if it breaks things 😅