-
Notifications
You must be signed in to change notification settings - Fork 522
e2e test setup #1828
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
Draft
piatoss3612
wants to merge
3
commits into
develop
Choose a base branch
from
rowan/setup-e2e-test
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
e2e test setup #1828
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
49b4794
feat: add comprehensive E2E test suite with Playwright for multi-chai…
piatoss3612 c22ca92
refactor: improve E2E test reliability by replacing `waitForTimeout` …
piatoss3612 e9e79f8
ci: Grant `contents: read` permission to e2e and qa workflows.
piatoss3612 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 hidden or 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,309 @@ | ||
| name: E2E Multi-Chain Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: | ||
| - master | ||
| paths: | ||
| - 'apps/extension/**' | ||
| - 'packages/stores-eth/**' | ||
| - 'packages/stores-bitcoin/**' | ||
| - 'packages/stores-starknet/**' | ||
| - 'packages/hooks-starknet/**' | ||
| - 'packages/**' | ||
| - '.github/workflows/e2e-multichain.yml' | ||
| push: | ||
| branches: | ||
| - master | ||
| - develop | ||
| paths: | ||
| - 'apps/extension/**' | ||
| - 'packages/**' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| name: Build Extension | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| submodules: true | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Install dependencies | ||
| run: yarn install --immutable | ||
|
|
||
| - name: Build extension (MV3 only) | ||
| run: | | ||
| cd apps/extension | ||
| npx cross-env NODE_ENV=production BUILD_OUTPUT=build/manifest-v3 webpack | ||
| env: | ||
| KEPLR_EXT_ETHEREUM_ENDPOINT: ${{ secrets.KEPLR_EXT_ETHEREUM_ENDPOINT }} | ||
| KEPLR_EXT_ANALYTICS_API_AUTH_TOKEN: ${{ secrets.KEPLR_EXT_ANALYTICS_API_AUTH_TOKEN }} | ||
| KEPLR_EXT_ANALYTICS_API_URL: ${{ secrets.KEPLR_EXT_ANALYTICS_API_URL }} | ||
| KEPLR_EXT_COINGECKO_ENDPOINT: ${{ secrets.KEPLR_EXT_COINGECKO_ENDPOINT }} | ||
| KEPLR_EXT_COINGECKO_GETPRICE: ${{ secrets.KEPLR_EXT_COINGECKO_GETPRICE }} | ||
| KEPLR_EXT_COINGECKO_COIN_DATA_BY_TOKEN_ADDRESS: ${{ secrets.KEPLR_EXT_COINGECKO_COIN_DATA_BY_TOKEN_ADDRESS }} | ||
| KEPLR_EXT_TRANSAK_API_KEY: ${{ secrets.KEPLR_EXT_TRANSAK_API_KEY }} | ||
| KEPLR_EXT_MOONPAY_API_KEY: ${{ secrets.KEPLR_EXT_MOONPAY_API_KEY }} | ||
| KEPLR_EXT_SWAPPED_API_KEY: ${{ secrets.KEPLR_EXT_SWAPPED_API_KEY }} | ||
| KEPLR_EXT_SWAPPED_API_SECRET: ${{ secrets.KEPLR_EXT_SWAPPED_API_SECRET }} | ||
| KEPLR_EXT_CHAIN_REGISTRY_URL: ${{ secrets.KEPLR_EXT_CHAIN_REGISTRY_URL }} | ||
| KEPLR_EXT_GOOGLE_MEASUREMENT_ID: ${{ secrets.KEPLR_EXT_GOOGLE_MEASUREMENT_ID }} | ||
| KEPLR_EXT_GOOGLE_API_KEY_FOR_MEASUREMENT: ${{ secrets.KEPLR_EXT_GOOGLE_API_KEY_FOR_MEASUREMENT }} | ||
| KEPLR_EXT_TOKEN_FACTORY_BASE_URL: ${{ secrets.KEPLR_EXT_TOKEN_FACTORY_BASE_URL }} | ||
| KEPLR_EXT_TOKEN_FACTORY_URI: ${{ secrets.KEPLR_EXT_TOKEN_FACTORY_URI }} | ||
| KEPLR_EXT_TX_HISTORY_BASE_URL: ${{ secrets.KEPLR_EXT_TX_HISTORY_BASE_URL }} | ||
| KEPLR_EXT_CONFIG_SERVER: ${{ secrets.KEPLR_EXT_CONFIG_SERVER }} | ||
| WC_PROJECT_ID: ${{ secrets.WC_PROJECT_ID }} | ||
| SKIP_API_KEY: ${{ secrets.SKIP_API_KEY }} | ||
| KEPLR_EXT_PROVIDER_META_ID: ${{ secrets.KEPLR_EXT_PROVIDER_META_ID }} | ||
| KEPLR_EXT_MOONPAY_SIGN_API_BASE_URL: ${{ secrets.KEPLR_EXT_MOONPAY_SIGN_API_BASE_URL }} | ||
| KEPLR_EXT_AMPLITUDE_API_KEY: ${{ secrets.KEPLR_EXT_AMPLITUDE_API_KEY }} | ||
| KEPLR_API_ENDPOINT: ${{ secrets.KEPLR_API_ENDPOINT }} | ||
| KEPLR_EXT_TX_CODEC_BASE_URL: ${{ secrets.KEPLR_EXT_TX_CODEC_BASE_URL }} | ||
| KEPLR_EXT_TOPUP_BASE_URL: ${{ secrets.KEPLR_EXT_TOPUP_BASE_URL }} | ||
| KEPLR_EXT_TOPUP_API_KEY: ${{ secrets.KEPLR_EXT_TOPUP_API_KEY }} | ||
|
|
||
| - name: Upload build artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: extension-build | ||
| path: apps/extension/build/manifest-v3/ | ||
| retention-days: 1 | ||
|
|
||
| smoke-tests: | ||
| name: Smoke Tests | ||
| needs: build | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: extension-build | ||
| path: apps/extension/build/manifest-v3/ | ||
|
|
||
| - name: Install E2E dependencies | ||
| run: | | ||
| cd apps/extension/e2e | ||
| yarn install | ||
| npx playwright install chromium | ||
| npx playwright install-deps chromium | ||
|
|
||
| - name: Run smoke tests | ||
| run: | | ||
| cd apps/extension/e2e | ||
| xvfb-run --auto-servernum -- npx playwright test tests/smoke/ --reporter=list | ||
| env: | ||
| CI: true | ||
| EXTENSION_PATH: ../build/manifest-v3 | ||
|
|
||
| - name: Upload smoke test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: smoke-test-results | ||
| path: apps/extension/e2e/test-results/ | ||
| retention-days: 7 | ||
|
|
||
| evm-tests: | ||
|
|
||
| name: EVM Chain Tests | ||
| needs: smoke-tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: extension-build | ||
| path: apps/extension/build/manifest-v3/ | ||
|
|
||
| - name: Install E2E dependencies | ||
| run: | | ||
| cd apps/extension/e2e | ||
| yarn install | ||
| npx playwright install chromium | ||
| npx playwright install-deps chromium | ||
|
|
||
| - name: Run EVM tests | ||
| run: | | ||
| cd apps/extension/e2e | ||
| xvfb-run --auto-servernum -- npx playwright test tests/evm/ --reporter=list | ||
| env: | ||
| CI: true | ||
| EXTENSION_PATH: ../build/manifest-v3 | ||
|
|
||
| - name: Upload EVM test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: evm-test-results | ||
| path: apps/extension/e2e/test-results/ | ||
| retention-days: 7 | ||
|
|
||
| bitcoin-tests: | ||
|
|
||
| name: Bitcoin Chain Tests | ||
| needs: smoke-tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: extension-build | ||
| path: apps/extension/build/manifest-v3/ | ||
|
|
||
| - name: Install E2E dependencies | ||
| run: | | ||
| cd apps/extension/e2e | ||
| yarn install | ||
| npx playwright install chromium | ||
| npx playwright install-deps chromium | ||
|
|
||
| - name: Run Bitcoin tests | ||
| run: | | ||
| cd apps/extension/e2e | ||
| xvfb-run --auto-servernum -- npx playwright test tests/bitcoin/ --reporter=list | ||
| env: | ||
| CI: true | ||
| EXTENSION_PATH: ../build/manifest-v3 | ||
|
|
||
| - name: Upload Bitcoin test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: bitcoin-test-results | ||
| path: apps/extension/e2e/test-results/ | ||
| retention-days: 7 | ||
|
|
||
| starknet-tests: | ||
|
|
||
| name: Starknet Chain Tests | ||
| needs: smoke-tests | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: extension-build | ||
| path: apps/extension/build/manifest-v3/ | ||
|
|
||
| - name: Install E2E dependencies | ||
| run: | | ||
| cd apps/extension/e2e | ||
| yarn install | ||
| npx playwright install chromium | ||
| npx playwright install-deps chromium | ||
|
|
||
| - name: Run Starknet tests | ||
| run: | | ||
| cd apps/extension/e2e | ||
| xvfb-run --auto-servernum -- npx playwright test tests/starknet/ --reporter=list | ||
| env: | ||
| CI: true | ||
| EXTENSION_PATH: ../build/manifest-v3 | ||
|
|
||
| - name: Upload Starknet test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: starknet-test-results | ||
| path: apps/extension/e2e/test-results/ | ||
| retention-days: 7 | ||
|
|
||
| crosschain-tests: | ||
|
|
||
| name: Cross-Chain Tests | ||
| needs: [evm-tests, bitcoin-tests, starknet-tests] | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'yarn' | ||
|
|
||
| - name: Download build artifact | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| name: extension-build | ||
| path: apps/extension/build/manifest-v3/ | ||
|
|
||
| - name: Install E2E dependencies | ||
| run: | | ||
| cd apps/extension/e2e | ||
| yarn install | ||
| npx playwright install chromium | ||
| npx playwright install-deps chromium | ||
|
|
||
| - name: Run cross-chain tests | ||
| run: | | ||
| cd apps/extension/e2e | ||
| xvfb-run --auto-servernum -- npx playwright test tests/crosschain/ --reporter=list | ||
| env: | ||
| CI: true | ||
| EXTENSION_PATH: ../build/manifest-v3 | ||
|
|
||
| - name: Upload cross-chain test results | ||
| if: failure() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: crosschain-test-results | ||
| path: apps/extension/e2e/test-results/ | ||
| retention-days: 7 | ||
|
|
||
| - name: Upload Playwright report | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: playwright-report-multichain | ||
| path: apps/extension/e2e/playwright-report/ | ||
| retention-days: 7 | ||
|
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.