From 45493915f8d10386001970943311c4119d6a0357 Mon Sep 17 00:00:00 2001 From: Howard Braham Date: Tue, 28 Jan 2025 20:12:00 -0500 Subject: [PATCH] run-e2e --- .github/workflows/e2e.yml | 77 ++++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 5 +++ test/e2e/run-all.js | 2 + 3 files changed, 84 insertions(+) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 000000000000..67468c8afe57 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ac64dc17576a..9d7f852d4de1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/test/e2e/run-all.js b/test/e2e/run-all.js index 6c43cdf36b08..f4fc0d19b090 100644 --- a/test/e2e/run-all.js +++ b/test/e2e/run-all.js @@ -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