6
6
- main
7
7
- master
8
8
- Version-v*
9
+ - trigger-ci*
9
10
pull_request :
10
11
types :
11
12
- opened
16
17
jobs :
17
18
lint-workflows :
18
19
name : Lint workflows
19
- uses : metamask/github-tools/.github/workflows/lint-workflows.yml@c534f265e02af2f2422a3c686bb09a11bfbf4cc2
20
+ uses : metamask/github-tools/.github/workflows/lint-workflows.yml@benchmarks
20
21
21
22
test-lint-shellcheck :
22
23
name : Test lint shellcheck
@@ -62,10 +63,46 @@ jobs:
62
63
name : Validate lavamoat policy webapp
63
64
uses : ./.github/workflows/validate-lavamoat-policy-webapp.yml
64
65
66
+ prep-build-test-webpack :
67
+ runs-on : ubuntu-latest
68
+ steps :
69
+ - name : Checkout repository
70
+ uses : actions/checkout@v4
71
+
72
+ - name : Setup environment
73
+ uses : metamask/github-tools/.github/actions/setup-environment@main
74
+
75
+ - run : yarn webpack --test --no-lavamoat --no-cache --browser=chrome --lockdown --sentry --snow --env production
76
+ env :
77
+ SEGMENT_PROD_WRITE_KEY : ' -' # A fake key just to make the build succeed
78
+
79
+ - name : Upload artifact prep-build-test-webpack
80
+ uses : actions/upload-artifact@v4
81
+ with :
82
+ name : prep-build-test-webpack
83
+ path : ./dist/
84
+ retention-days : 1
85
+
65
86
run-tests :
66
87
name : Run tests
67
88
uses : ./.github/workflows/run-tests.yml
68
89
90
+ run-pageload-benchmark :
91
+ name : Run Benchmarks # So that the level 1 name will be "Run Benchmarks" in the GitHub Actions UI
92
+ needs : prep-build-test-webpack
93
+ uses : ./.github/workflows/benchmarks.yml
94
+ with :
95
+ name : run-pageload-benchmark # The level 2 name
96
+ command : ' yarn benchmark:chrome --out test-artifacts/chrome/benchmark/pageload.json --retries 2'
97
+
98
+ run-user-actions-benchmark :
99
+ name : Run Benchmarks # So that the level 1 name will be "Run Benchmarks" in the GitHub Actions UI
100
+ needs : prep-build-test-webpack
101
+ uses : ./.github/workflows/benchmarks.yml
102
+ with :
103
+ name : run-user-actions-benchmark # The level 2 name
104
+ command : ' yarn user-actions-benchmark:chrome --out test-artifacts/chrome/benchmark/user_actions.json --retries 2'
105
+
69
106
wait-for-circleci-workflow-status :
70
107
name : Wait for CircleCI workflow status
71
108
uses : ./.github/workflows/wait-for-circleci-workflow-status.yml
@@ -106,6 +143,8 @@ jobs:
106
143
secrets :
107
144
PR_COMMENT_TOKEN : ${{ secrets.PR_COMMENT_TOKEN }}
108
145
146
+ # Explanation for all-jobs-completed and all-jobs-pass being separate:
147
+ # https://github.com/MetaMask/metamask-module-template/pull/151
109
148
all-jobs-completed :
110
149
name : All jobs completed
111
150
runs-on : ubuntu-latest
@@ -122,6 +161,8 @@ jobs:
122
161
- validate-lavamoat-policy-build
123
162
- validate-lavamoat-policy-webapp
124
163
- run-tests
164
+ # - run-pageload-benchmark # Will enable this as a required job in a later PR
165
+ # - run-user-actions-benchmark # Will enable this as a required job in a later PR
125
166
- wait-for-circleci-workflow-status
126
167
- build-storybook
127
168
- build-beta
0 commit comments