test: expand E2Es for CrabNebula WebDriver provider #1259
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
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v[0-9]+.[0-9]+.[0-9]+* | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| force_all: | |
| description: 'Run all tests (ignore change detection)' | |
| required: false | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| env: | |
| TURBO_TELEMETRY_DISABLED: 1 | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ secrets.TURBO_TEAM }} | |
| jobs: | |
| # Detect which services are affected by changes | |
| detect-changes: | |
| uses: ./.github/workflows/_ci-detect-changes.reusable.yml | |
| with: | |
| force_all: ${{ inputs.force_all || false }} | |
| # Build on Linux first since it's the fastest and its artifacts are used by all other jobs | |
| build: | |
| name: Build [Linux] | |
| needs: [detect-changes] | |
| uses: ./.github/workflows/_ci-build.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-latest' | |
| # Run linting after build to use the build artifacts | |
| lint: | |
| name: Lint [Linux] | |
| needs: [detect-changes, build] | |
| uses: ./.github/workflows/_ci-lint.reusable.yml | |
| secrets: inherit | |
| with: | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| # Run unit tests in parallel with lint - both only need build artifacts | |
| unit-matrix: | |
| name: Unit | |
| needs: [build] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| - os: windows-latest | |
| display-name: Windows | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| uses: ./.github/workflows/_ci-unit.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: ${{ matrix.os }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| # Build Tauri E2E app binaries - only if Tauri tests will run | |
| build-tauri-e2e-app-linux: | |
| name: Build Tauri E2E App [Linux] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-build-tauri-e2e-app.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-latest' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| build-tauri-e2e-app-windows: | |
| name: Build Tauri E2E App [Windows] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-build-tauri-e2e-app.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'windows-latest' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| build-tauri-e2e-app-macos-arm: | |
| name: Build Tauri E2E App [macOS-ARM] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-build-tauri-e2e-app.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'macos-latest' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| build-tauri-e2e-app-macos-intel: | |
| name: Build Tauri E2E App [macOS-Intel] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-build-tauri-e2e-app.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'macos-15-intel' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| # Build Tauri package test apps - only if Tauri package tests will run | |
| build-tauri-package-app-linux: | |
| name: Build Tauri Package Test App [Linux] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-build-tauri-package-app.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-latest' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| build-tauri-package-app-windows: | |
| name: Build Tauri Package Test App [Windows] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-build-tauri-package-app.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'windows-latest' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| build-tauri-package-app-linux-arm: | |
| name: Build Tauri Package Test App [Linux-ARM64] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-build-tauri-package-app.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-24.04-arm' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| # Run package tests after unit tests to ensure the package is built correctly | |
| # Split Electron and Tauri tests across separate jobs for better parallelization and clarity | |
| # Electron apps are built inline on the test runner (faster builds, Turbo caching handles it) | |
| # Tauri apps are built separately due to longer build times and system dependencies | |
| # Electron package tests are split by module type (CJS/ESM) for better error isolation | |
| package-electron-matrix: | |
| name: Package - Electron | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_electron == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| module-type: cjs | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| module-type: esm | |
| - os: windows-latest | |
| display-name: Windows | |
| module-type: cjs | |
| - os: windows-latest | |
| display-name: Windows | |
| module-type: esm | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| module-type: cjs | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| module-type: esm | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| module-type: cjs | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| module-type: esm | |
| uses: ./.github/workflows/_ci-package.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: ${{ matrix.os }} | |
| service: 'electron' | |
| module-type: ${{ matrix.module-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| package-tauri-linux: | |
| name: Package - Tauri [Linux] | |
| needs: [detect-changes, build, build-tauri-package-app-linux] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-package.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-latest' | |
| service: 'tauri' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-package-app-linux.outputs.cache_key }} | |
| package-tauri-windows: | |
| name: Package - Tauri [Windows] | |
| needs: [detect-changes, build, build-tauri-package-app-windows] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-package.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'windows-latest' | |
| service: 'tauri' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-package-app-windows.outputs.cache_key }} | |
| package-tauri-linux-arm: | |
| name: Package - Tauri [Linux-ARM64] | |
| needs: [detect-changes, build, build-tauri-package-app-linux-arm] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| uses: ./.github/workflows/_ci-package.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-24.04-arm' | |
| service: 'tauri' | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-package-app-linux-arm.outputs.cache_key }} | |
| # Run Tauri package tests across different Linux distributions using Docker | |
| # Tests cross-distro compatibility, tauri-driver auto-installation, and WebKitWebDriver detection | |
| # Excluded distributions: | |
| # - SUSE: No official WebKitWebDriver package (requires multi-hour source build) | |
| # - Alpine: musl/static linking incompatible with GTK/webkit (no static libraries available) | |
| # - CentOS Stream 9: glib 2.68 too old (Tauri requires >= 2.70) | |
| # - CentOS Stream 10: WebKitGTK removed by Red Hat due to 200+ CVEs and unsustainable maintenance | |
| package-tauri-distros: | |
| name: Package - Tauri (Docker) | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - distro: ubuntu | |
| display-name: Ubuntu | |
| - distro: fedora | |
| display-name: Fedora | |
| - distro: debian | |
| display-name: Debian | |
| - distro: arch | |
| display-name: Arch | |
| - distro: void | |
| display-name: Void | |
| uses: ./.github/workflows/_ci-package-docker.reusable.yml | |
| secrets: inherit | |
| with: | |
| distro: ${{ matrix.distro }} | |
| # Run build tests outside of the main Linux build job | |
| build-matrix: | |
| name: Build | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_electron == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| display-name: Windows | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| uses: ./.github/workflows/_ci-build.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: ${{ matrix.os }} | |
| # E2E test matrix strategy: | |
| # - Run tests across operating systems and architectures (Linux, Windows, macOS ARM, macOS Intel) | |
| # - Test 3 scenarios (builder, forge, script) | |
| # - E2E tests use ESM only (CJS/ESM testing is done in package tests) | |
| # - Optimize for GitHub Actions concurrency limits | |
| e2e-matrix: | |
| name: E2E - Electron | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_electron == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| scenario: builder | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| scenario: forge | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| scenario: script | |
| - os: windows-latest | |
| display-name: Windows | |
| scenario: builder | |
| - os: windows-latest | |
| display-name: Windows | |
| scenario: forge | |
| - os: windows-latest | |
| display-name: Windows | |
| scenario: script | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| scenario: builder | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| scenario: forge | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| scenario: script | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| scenario: builder | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| scenario: forge | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| scenario: script | |
| uses: ./.github/workflows/_ci-e2e.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: ${{ matrix.os }} | |
| node-version: '20' | |
| scenario: ${{ matrix.scenario }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| # Electron window tests - run on Linux with splash screen enabled | |
| e2e-electron-window: | |
| name: E2E - Electron [Linux] (window) | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_electron == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| scenario: builder | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| scenario: forge | |
| - os: ubuntu-latest | |
| display-name: Linux | |
| scenario: script | |
| uses: ./.github/workflows/_ci-e2e.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: ${{ matrix.os }} | |
| node-version: '20' | |
| scenario: ${{ matrix.scenario }} | |
| variant: window | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| # Tauri E2E tests for Linux - only waits for E2E app build | |
| e2e-tauri-linux-matrix: | |
| name: E2E - Tauri [Linux] - ${{ matrix.scenario }}${{ matrix.test-type != 'standard' && format(' ({0})', matrix.test-type) || '' }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-linux] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| scenario: ['tauri-basic'] | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-latest' | |
| node-version: '20' | |
| scenario: ${{ matrix.scenario }} | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-linux.outputs.cache_key }} | |
| # Tauri E2E tests for Windows | |
| e2e-tauri-windows-matrix: | |
| name: E2E - Tauri [Windows] - ${{ matrix.scenario }}${{ matrix.test-type != 'standard' && format(' ({0})', matrix.test-type) || '' }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-windows] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| scenario: ['tauri-basic'] | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'windows-latest' | |
| node-version: '20' | |
| scenario: ${{ matrix.scenario }} | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-windows.outputs.cache_key }} | |
| # Tauri E2E tests for macOS - skipped with clear messaging | |
| # macOS is not supported due to WKWebView WebDriver limitations | |
| e2e-tauri-macos-matrix: | |
| name: E2E - Tauri (macOS) | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| scenario: tauri-basic | |
| test-type: standard | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| scenario: tauri-basic | |
| test-type: multiremote | |
| - os: macos-latest | |
| display-name: macOS-ARM | |
| scenario: tauri-basic | |
| test-type: standalone | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| scenario: tauri-basic | |
| test-type: standard | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| scenario: tauri-basic | |
| test-type: multiremote | |
| - os: macos-15-intel | |
| display-name: macOS-Intel | |
| scenario: tauri-basic | |
| test-type: standalone | |
| uses: ./.github/workflows/_ci-e2e-tauri.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: ${{ matrix.os }} | |
| node-version: '20' | |
| scenario: ${{ matrix.scenario }} | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: '' | |
| # Tauri E2E tests using embedded WebDriver provider | |
| # Works on all platforms including macOS (no external driver needed) | |
| e2e-tauri-embedded-linux: | |
| name: E2E - Tauri Embedded [Linux] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-linux] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-embedded.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-latest' | |
| node-version: '20' | |
| scenario: 'tauri-basic-embedded' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-linux.outputs.cache_key }} | |
| e2e-tauri-embedded-windows: | |
| name: E2E - Tauri Embedded [Windows] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-windows] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-embedded.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'windows-latest' | |
| node-version: '20' | |
| scenario: 'tauri-basic-embedded' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-windows.outputs.cache_key }} | |
| # Embedded provider tests on macOS - native WKWebView support | |
| e2e-tauri-embedded-macos-arm: | |
| name: E2E - Tauri Embedded [macOS-ARM] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-macos-arm] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-embedded.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'macos-latest' | |
| node-version: '20' | |
| scenario: 'tauri-basic-embedded' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-macos-arm.outputs.cache_key }} | |
| e2e-tauri-embedded-macos-intel: | |
| name: E2E - Tauri Embedded [macOS-Intel] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-macos-intel] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-embedded.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'macos-15-intel' | |
| node-version: '20' | |
| scenario: 'tauri-basic-embedded' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-macos-intel.outputs.cache_key }} | |
| # Tauri E2E tests using CrabNebula WebDriver provider | |
| # Works on all platforms (CN_API_KEY required for macOS only) | |
| e2e-tauri-crabnebula-linux: | |
| name: E2E - Tauri CrabNebula [Linux] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-linux] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-crabnebula.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'ubuntu-latest' | |
| node-version: '20' | |
| scenario: 'tauri-basic-crabnebula' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-linux.outputs.cache_key }} | |
| e2e-tauri-crabnebula-windows: | |
| name: E2E - Tauri CrabNebula [Windows] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-windows] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-crabnebula.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'windows-latest' | |
| node-version: '20' | |
| scenario: 'tauri-basic-crabnebula' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-windows.outputs.cache_key }} | |
| e2e-tauri-crabnebula-macos-arm: | |
| name: E2E - Tauri CrabNebula [macOS-ARM] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-macos-arm] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-crabnebula.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'macos-latest' | |
| node-version: '20' | |
| scenario: 'tauri-basic-crabnebula' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-macos-arm.outputs.cache_key }} | |
| e2e-tauri-crabnebula-macos-intel: | |
| name: E2E - Tauri CrabNebula [macOS-Intel] - ${{ matrix.test-type }} | |
| needs: [detect-changes, build, build-tauri-e2e-app-macos-intel] | |
| if: needs.detect-changes.outputs.run_tauri == 'true' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| test-type: ['standard', 'window', 'multiremote', 'standalone', 'deeplink'] | |
| uses: ./.github/workflows/_ci-e2e-tauri-crabnebula.reusable.yml | |
| secrets: inherit | |
| with: | |
| os: 'macos-15-intel' | |
| node-version: '20' | |
| scenario: 'tauri-basic-crabnebula' | |
| test-type: ${{ matrix.test-type }} | |
| build_id: ${{ needs.build.outputs.build_id }} | |
| artifact_size: ${{ needs.build.outputs.artifact_size }} | |
| cache_key: ${{ needs.build.outputs.cache_key }} | |
| tauri_cache_key: ${{ needs.build-tauri-e2e-app-macos-intel.outputs.cache_key }} | |
| # Universal binary verification - Electron only | |
| package-electron-mac-universal: | |
| name: Package - Electron [macOS-Universal-Verify] | |
| needs: [detect-changes, build] | |
| if: needs.detect-changes.outputs.run_electron == 'true' | |
| runs-on: macos-latest | |
| steps: | |
| - name: 👷 Checkout Repository | |
| uses: actions/checkout@v6 | |
| - name: 🛠️ Setup Development Environment | |
| uses: ./.github/workflows/actions/setup-workspace | |
| with: | |
| node-version: '20' | |
| - name: 📦 Download Build Artifacts | |
| uses: ./.github/workflows/actions/download-archive | |
| with: | |
| name: wdio-desktop-mobile | |
| path: wdio-desktop-mobile-build | |
| filename: artifact.zip | |
| cache_key_prefix: wdio-desktop-build | |
| exact_cache_key: ${{ needs.build.outputs.cache_key || github.run_id && format('{0}-{1}-{2}-{3}{4}', 'Linux', 'wdio-desktop-build', 'wdio-desktop-mobile', github.run_id, github.run_attempt > 1 && format('-rerun{0}', github.run_attempt) || '') || '' }} | |
| - name: 🔨 Build Universal Binary (Electron Builder) | |
| run: pnpm --filter electron-builder-e2e-app build:mac-universal | |
| - name: ✅ Verify Universal Binary Contains Both Architectures (Builder) | |
| run: | | |
| BINARY_PATH="fixtures/e2e-apps/electron-builder/dist-electron/mac-universal/electron-builder-e2e-app.app/Contents/MacOS/electron-builder-e2e-app" | |
| if [ ! -f "$BINARY_PATH" ]; then | |
| echo "❌ Binary not found at $BINARY_PATH" | |
| echo "Contents of dist-electron/mac-universal:" | |
| ls -la fixtures/e2e-apps/electron-builder/dist-electron/mac-universal/ || echo "Directory does not exist" | |
| exit 1 | |
| fi | |
| echo "Binary found, checking architecture..." | |
| lipo -info "$BINARY_PATH" | |
| ARCHS=$(lipo -info "$BINARY_PATH" | grep "Architectures" | awk '{print $(NF-1), $NF}') | |
| echo "Found architectures: $ARCHS" | |
| if [[ "$ARCHS" != *"x86_64"* ]]; then | |
| echo "❌ Missing x86_64 architecture" | |
| exit 1 | |
| fi | |
| if [[ "$ARCHS" != *"arm64"* ]]; then | |
| echo "❌ Missing arm64 architecture" | |
| exit 1 | |
| fi | |
| echo "✅ Universal binary verified: $ARCHS" | |
| - name: 🔨 Build Universal Binary (Electron Forge) | |
| run: pnpm --filter electron-forge-e2e-app build:mac-universal | |
| - name: ✅ Verify Universal Binary Contains Both Architectures (Forge) | |
| run: | | |
| BINARY_PATH="fixtures/e2e-apps/electron-forge/out/electron-forge-e2e-app-darwin-universal/electron-forge-e2e-app.app/Contents/MacOS/electron-forge-e2e-app" | |
| if [ ! -f "$BINARY_PATH" ]; then | |
| echo "❌ Binary not found at $BINARY_PATH" | |
| echo "Contents of out/:" | |
| ls -la fixtures/e2e-apps/electron-forge/out/ || echo "Directory does not exist" | |
| exit 1 | |
| fi | |
| echo "Binary found, checking architecture..." | |
| lipo -info "$BINARY_PATH" | |
| ARCHS=$(lipo -info "$BINARY_PATH" | grep "Architectures" | awk '{print $(NF-1), $NF}') | |
| echo "Found architectures: $ARCHS" | |
| if [[ "$ARCHS" != *"x86_64"* ]]; then | |
| echo "❌ Missing x86_64 architecture" | |
| exit 1 | |
| fi | |
| if [[ "$ARCHS" != *"arm64"* ]]; then | |
| echo "❌ Missing arm64 architecture" | |
| exit 1 | |
| fi | |
| echo "✅ Universal binary verified: $ARCHS" | |
| # Single status check gate - use this as the sole required check in branch protection | |
| # Avoids needing to update branch protection rules when CI jobs are added/removed | |
| ci-status: | |
| name: CI Status | |
| if: always() | |
| needs: | |
| - lint | |
| - unit-matrix | |
| - e2e-matrix | |
| - e2e-electron-window | |
| - e2e-tauri-linux-matrix | |
| - e2e-tauri-windows-matrix | |
| - e2e-tauri-macos-matrix | |
| - e2e-tauri-embedded-linux | |
| - e2e-tauri-embedded-windows | |
| - e2e-tauri-embedded-macos-arm | |
| - e2e-tauri-embedded-macos-intel | |
| - package-electron-matrix | |
| - package-tauri-linux | |
| - package-tauri-windows | |
| - package-tauri-linux-arm | |
| - package-tauri-distros | |
| - build-matrix | |
| - package-electron-mac-universal | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check CI results | |
| run: | | |
| results="${{ join(needs.*.result, ' ') }}" | |
| echo "Job results: $results" | |
| for result in $results; do | |
| if [ "$result" = "failure" ] || [ "$result" = "cancelled" ]; then | |
| echo "CI failed: found job with result '$result'" | |
| exit 1 | |
| fi | |
| done | |
| echo "All CI jobs passed or were skipped" |