-
Notifications
You must be signed in to change notification settings - Fork 5.1k
41 lines (35 loc) · 1.29 KB
/
run-benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
on:
workflow_call:
env:
COMMANDS: |
{
pageload: 'yarn benchmark:chrome --out test-artifacts/chrome/benchmark/pageload.json --retries 2',
userActions: 'yarn user-actions-benchmark:chrome --out test-artifacts/chrome/benchmark/user_actions.json --retries 2',
}
jobs:
benchmarks:
runs-on: ubuntu-22.04
strategy:
matrix:
buildType: [browserify, webpack]
testType: [pageload, userActions]
name: ${{ matrix.buildType }}-${{ matrix.testType }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@1d657e262aea7e3f216754febb624831527d2565
- name: Download artifact prep-build-test-${{ matrix.buildType }}
uses: actions/download-artifact@v4
with:
path: ./dist/
pattern: prep-build-test-${{ matrix.buildType }}
merge-multiple: true
- name: Run the benchmark
# Choose a benchmark command from env.COMMANDS
run: ${{ fromJson(env.COMMANDS)[matrix.testType] }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: benchmark-${{ matrix.buildType }}-${{ matrix.testType }}
path: test-artifacts/chrome/benchmark/