Skip to content

Commit

Permalink
run-e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
HowardBraham committed Jan 29, 2025
1 parent 634a78f commit 4549391
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
on:
workflow_call:

jobs:
benchmarks-sh:
runs-on: gha-mm-scale-set-ubuntu-22.04-amd64-med
container:
image: cimg/node:22.13-browsers
steps:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: ${{ vars.USE_CACHING }}

- name: Download artifact prep-build-test-webpack
uses: actions/download-artifact@v4
with:
path: ./dist/
pattern: prep-build-test-webpack
merge-multiple: true

- name: Configure Xvfb
run: Xvfb -ac :99 -screen 0 1280x1024x16 &

- name: test:e2e:chrome:webpack
run: yarn test:e2e:chrome:webpack

- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: webpack-e2e
path: |
test-artifacts
test/test-results/e2e
benchmarks-ubuntu-latest:
runs-on: ubuntu-latest
container:
image: cimg/node:22.13-browsers
steps:
- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@caching
with:
should-cache-restore: ${{ vars.USE_CACHING }}

- name: Download artifact prep-build-test-webpack
uses: actions/download-artifact@v4
with:
path: ./dist/
pattern: prep-build-test-webpack
merge-multiple: true

- name: Configure Xvfb
run: Xvfb -ac :99 -screen 0 1280x1024x16 &

- name: test:e2e:chrome:webpack
run: yarn test:e2e:chrome:webpack

- store_artifacts:
path: test-artifacts
destination: test-artifacts
- store_test_results:
path: test/test-results/e2e

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: webpack-e2e-ubuntu-latest
path: |
test-artifacts
test/test-results/e2e
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ jobs:
name: run-user-actions-benchmark # The level 2 name
command: 'yarn user-actions-benchmark:chrome --out test-artifacts/chrome/benchmark/user_actions.json --retries 2'

run-e2e:
name: Run E2E
needs: prep-build-test-webpack
uses: ./.github/workflows/e2e.yml

wait-for-circleci-workflow-status:
name: Wait for CircleCI workflow status
uses: ./.github/workflows/wait-for-circleci-workflow-status.yml
Expand Down
2 changes: 2 additions & 0 deletions test/e2e/run-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ async function main() {
myTestList = testPaths;
}

myTestList = testPaths.slice(0, 7);

console.log('My test list:', myTestList);

// spawn `run-e2e-test.js` for each test in myTestList
Expand Down

0 comments on commit 4549391

Please sign in to comment.