E2E #2060
This file contains 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
name: E2E | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 9 * * *" # run every day at 9:00 UTC | |
push: | |
branches: [main] | |
env: | |
CRYPTKEEPER_DEBUG: false | |
USER_MNEMONIC: true | |
E2E: true | |
METAMASK_EXTENSION_ID: "" | |
METAMASK_VERSION: "10.28.1" | |
INFURA_API_KEY: ${{ secrets.INFURA_API_KEY }} | |
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | |
FREIGHT_TRUST_NETWORK: ${{ secrets.FREIGHT_TRUST_NETWORK }} | |
PULSECHAIN_API_KEY: ${{ secrets.PULSECHAIN_API_KEY }} | |
BANDADA_API_URL: ${{ vars.BANDADA_API_URL }} | |
BANDADA_URL: ${{ vars.BANDADA_URL }} | |
TARGET: "chrome" | |
DEMO_URL: ${{ vars.DEMO_URL }} | |
MERKLE_MOCK_SERVER: ${{ vars.MERKLE_MOCK_SERVER }} | |
PLAYWRIGHT_VERSION: "" | |
MANIFEST_VERSION: 3 | |
VERIFIABLE_CREDENTIALS: false | |
WEBPACK_ANALYZER: false | |
TEST_GROUP_ID: ${{ vars.TEST_GROUP_ID }} | |
TEST_GROUP_API_KEY: ${{ vars.TEST_GROUP_API_KEY }} | |
TEST_GROUP_INVITE_CODE: ${{ vars.TEST_GROUP_INVITE_CODE }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
node-version: [18] | |
command: ["e2e"] | |
timeout-minutes: 120 | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
continue-on-error: true | |
with: | |
path: | | |
~/.pnpm-store | |
node_modules | |
/home/runner/.cache/Cypress | |
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Get installed Playwright version | |
id: playwright-version | |
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./packages/e2e/package.json').devDependencies['@playwright/test'])")" >> $GITHUB_ENV | |
- name: Cache playwright binaries | |
uses: actions/cache@v3 | |
id: playwright-cache | |
continue-on-error: true | |
with: | |
path: | | |
~/.cache/ms-playwright | |
ms-playwright | |
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Install dependencies | |
run: |- | |
pnpm install --frozen-lockfile --prefer-offline | |
- name: Build extension (Linux) | |
if: runner.os == 'Linux' | |
run: pnpm run build | |
env: | |
METAMASK_EXTENSION_ID: ${{ vars.TEST_METAMASK_EXTENSION_ID }} | |
- name: Build extension (Windows) | |
if: runner.os == 'Windows' | |
run: pnpm run build | |
env: | |
METAMASK_EXTENSION_ID: "" | |
- name: Build extension (macOS) | |
if: runner.os == 'macOS' | |
run: pnpm run build | |
env: | |
METAMASK_EXTENSION_ID: "" | |
- name: Install Playwright Browsers | |
if: steps.playwright-cache.outputs.cache-hit != 'true' | |
run: |- | |
pnpm exec playwright install | |
- name: Run Playwright tests | |
uses: coactions/setup-xvfb@v1 | |
with: | |
run: pnpm run ${{ matrix.command }} | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
continue-on-error: true | |
with: | |
name: playwright-report | |
path: ./packages/e2e/playwright-report/ | |
retention-days: 30 |