mirror of
https://github.com/tauri-apps/webdriver-example.git
synced 2026-01-31 00:55:20 +01:00
83 lines
2.2 KiB
YAML
83 lines
2.2 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- ".github/workflows/webdriver-v1.yml"
|
|
- "v1/**"
|
|
|
|
name: WebDriver (v1)
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ${{ matrix.platform }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [ubuntu-22.04, windows-latest]
|
|
webdriver-test: [selenium, webdriverio]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Tauri dependencies
|
|
if: matrix.platform == 'ubuntu-22.04'
|
|
run: >
|
|
sudo apt-get update &&
|
|
sudo apt-get install -y
|
|
libgtk-3-dev
|
|
libgtksourceview-3.0-dev
|
|
webkit2gtk-4.0
|
|
libayatana-appindicator3-dev
|
|
webkit2gtk-driver
|
|
xvfb
|
|
|
|
- name: install msdgedriver (Windows)
|
|
if: matrix.platform == 'windows-latest'
|
|
run: |
|
|
cargo install --git https://github.com/chippers/msedgedriver-tool
|
|
& "$HOME/.cargo/bin/msedgedriver-tool.exe"
|
|
$PWD.Path >> $env:GITHUB_PATH
|
|
|
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
cache: false
|
|
rustflags: ""
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: v1/src-tauri
|
|
|
|
- uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 10
|
|
|
|
- name: Node v18
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
cache: "pnpm"
|
|
cache-dependency-path: |
|
|
v1/pnpm-lock.yaml
|
|
v1/webdriver/${{ matrix.webdriver-test }}/pnpm-lock.yaml
|
|
|
|
- name: install dependencies
|
|
run: pnpm install
|
|
working-directory: v1
|
|
|
|
- name: Install tauri-driver
|
|
run: cargo install tauri-driver --locked
|
|
|
|
- name: run tests using ${{ matrix.webdriver-test }} (Linux)
|
|
if: matrix.platform == 'ubuntu-22.04'
|
|
run: |
|
|
pnpm install
|
|
xvfb-run pnpm test
|
|
working-directory: v1/webdriver/${{ matrix.webdriver-test }}
|
|
|
|
- name: run tests using ${{ matrix.webdriver-test }} (Windows)
|
|
if: matrix.platform == 'windows-latest'
|
|
run: |
|
|
pnpm install
|
|
pnpm test
|
|
working-directory: v1/webdriver/${{ matrix.webdriver-test }}
|