diff --git a/.github/actions/e2e-tests-contracts/action.yaml b/.github/actions/e2e-tests-contracts/action.yaml index fac2f0fa3..08e5bb4df 100644 --- a/.github/actions/e2e-tests-contracts/action.yaml +++ b/.github/actions/e2e-tests-contracts/action.yaml @@ -10,6 +10,9 @@ inputs: genesisSecret: description: Secret of genesis to fund the master wallet required: false + browser: + description: Browser to run tests on (chromium or chrome-beta) + required: true runs: using: 'composite' @@ -26,13 +29,13 @@ runs: NODE_ENV: test # E2E tests running with Playwright - - name: Install Playwright Browsers + - name: Install Playwright Browsers (${{ inputs.browser }}) shell: bash - run: npx playwright install --with-deps chromium + run: npx playwright install --with-deps ${{ inputs.browser }} - name: Run E2E Contract Tests shell: bash - run: xvfb-run --auto-servernum -- pnpm test:e2e:contracts + run: xvfb-run --auto-servernum -- pnpm test:e2e:contracts --project=${{ inputs.browser }} env: PORT: 5173 VITE_FUEL_PROVIDER_URL: ${{ inputs.providerUrl }} @@ -42,7 +45,7 @@ runs: - uses: actions/upload-artifact@v4 if: always() with: - name: playwright-report + name: playwright-report-${{ inputs.browser }} path: | packages/app/playwright-report/ packages/app/playwright-html/ diff --git a/.github/workflows/pr-tests-e2e-contracts.yml b/.github/workflows/pr-tests-e2e-contracts.yml index 3a47c31a5..02bdf73c8 100644 --- a/.github/workflows/pr-tests-e2e-contracts.yml +++ b/.github/workflows/pr-tests-e2e-contracts.yml @@ -11,11 +11,11 @@ concurrency: jobs: tests-e2e-contracts: - name: Test + name: Test (Chrome Stable) runs-on: buildjet-8vcpu-ubuntu-2204 timeout-minutes: 10 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: FuelLabs/github-actions/setups/node@master with: node-version: 20.11.0 @@ -41,16 +41,65 @@ jobs: run: pnpm deploy:contracts working-directory: ./packages/e2e-contract-tests - - name: Run E2E Contract Tests - Local + - name: Run E2E Contract Tests uses: ./.github/actions/e2e-tests-contracts with: providerUrl: "http://localhost:4000/v1/graphql" masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }} genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298" + browser: 'chromium' - uses: actions/upload-artifact@v4 if: always() with: name: playwright-e2e-contract-tests-report path: packages/e2e-contract-tests/playwright-results - retention-days: 30 \ No newline at end of file + retention-days: 30 + + tests-e2e-contracts-beta: + name: Test (Chrome Beta) + runs-on: buildjet-8vcpu-ubuntu-2204 + timeout-minutes: 10 + continue-on-error: true + steps: + - uses: actions/checkout@v4 + - uses: FuelLabs/github-actions/setups/node@master + with: + node-version: 20.11.0 + pnpm-version: 9.5.0 + + - uses: FuelLabs/github-actions/setups/docker@master + with: + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: ./.github/actions/setup-rust + + - name: Run PNPM install + id: pnpm-cache + run: + pnpm recursive install --frozen-lockfile + + - name: Start Test Node + run: pnpm node:up + + - name: Generate .env app + run: cp packages/app/.env.example packages/app/.env + + - name: Build & Deploy Contracts + run: pnpm deploy:contracts + working-directory: ./packages/e2e-contract-tests + - uses: ./.github/actions/e2e-tests-contracts + with: + providerUrl: "http://localhost:4000/v1/graphql" + masterMnemonic: ${{ secrets.VITE_MASTER_WALLET_MNEMONIC }} + genesisSecret: "0xa449b1ffee0e2205fa924c6740cc48b3b473aa28587df6dab12abc245d1f5298" + browser: 'chrome-beta' + + - uses: actions/upload-artifact@v4 + if: always() + with: + name: playwright-e2e-contract-tests-report-beta + path: packages/e2e-contract-tests/playwright-results + retention-days: 30 + + \ No newline at end of file diff --git a/packages/e2e-contract-tests/playwright.config.ts b/packages/e2e-contract-tests/playwright.config.ts index 9c12aa2a6..c0dc1c24c 100644 --- a/packages/e2e-contract-tests/playwright.config.ts +++ b/packages/e2e-contract-tests/playwright.config.ts @@ -10,8 +10,7 @@ const IS_CI = process.env.CI; const config: PlaywrightTestConfig = defineConfig({ testDir: './playwright', outputDir: './playwright-results/', - retries: 1, - maxFailures: IS_CI ? 1 : undefined, + retries: IS_CI ? 1 : 0, workers: 1, timeout: 60_000, reporter: [['html', { printSteps: true }]], @@ -30,7 +29,16 @@ const config: PlaywrightTestConfig = defineConfig({ projects: [ { name: 'chromium', - use: { ...devices['Desktop Chrome'] }, + use: { + ...devices['Desktop Chromium'], + }, + }, + { + name: 'chrome-beta', + use: { + channel: 'chrome-beta', + ...devices['Desktop Chrome'], + }, }, ], });