Skip to content

WebDriver (v2)

WebDriver (v2) #32

Workflow file for this run

on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/webdriver-v2.yml"
- "v2/**"
name: WebDriver (v2)
jobs:
test:
name: Test
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [windows-latest]
webdriver-test: [selenium]
steps:
- uses: actions/checkout@v2
- name: install Tauri dependencies (Linux)
if: matrix.platform == 'ubuntu-latest'
run: >
sudo apt-get update &&
sudo apt-get install -y
webkit2gtk-4.1
libayatana-appindicator3-dev
webkit2gtk-driver
xvfb
- name: Install Tauri dependencies (Windows)
if: matrix.platform == 'windows-latest'
shell: "powershell"
# https://github.com/actions/runner-images/issues/9538
# https://github.com/microsoft/playwright/pull/30009/files
# https://github.com/tauri-apps/wry/issues/1268
# Evergreen Bootstrapper
# The Bootstrapper is a tiny installer that downloads
# the Evergreen Runtime matching device architecture
# and installs it locally.
# https://developer.microsoft.com/en-us/microsoft-edge/webview2/consumer/?form=MA13LH
run: |
Invoke-WebRequest -Uri 'https://go.microsoft.com/fwlink/p/?LinkId=2124703' -OutFile 'setup.exe'
Start-Process -FilePath setup.exe -Verb RunAs -Wait
- name: add msedgedriver to PATH
if: matrix.platform == 'windows-latest'
run: echo "$env:EdgeWebDriver/msedgedriver.exe" >> $env:GITHUB_PATH
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache: false
rustflags: ""
- uses: Swatinem/rust-cache@v2
with:
workspaces: v2/src-tauri
- uses: pnpm/action-setup@v4
with:
version: 10
- name: Node v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
cache-dependency-path: |
v2/pnpm-lock.yaml
v2/webdriver/${{ matrix.webdriver-test }}/pnpm-lock.yaml
- name: install dependencies
run: pnpm install
working-directory: v2
- name: Install tauri-driver
run: cargo install tauri-driver --locked
- name: run tests using ${{ matrix.webdriver-test }} (Linux)
if: matrix.platform == 'ubuntu-latest'
run: |
pnpm install
xvfb-run pnpm test
working-directory: v2/webdriver/${{ matrix.webdriver-test }}
- name: run tests using ${{ matrix.webdriver-test }} (Windows)
if: matrix.platform == 'windows-latest'
run: |
pnpm install
pnpm test
working-directory: v2/webdriver/${{ matrix.webdriver-test }}