Skip to content

Commit d6ebe38

Browse files
committed
test CI on Windows
1 parent 7c6f5bf commit d6ebe38

File tree

2 files changed

+37
-9
lines changed

2 files changed

+37
-9
lines changed

.github/workflows/webdriver-v1.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@ name: WebDriver (v1)
1010
jobs:
1111
test:
1212
name: Test
13-
runs-on: ubuntu-22.04
13+
runs-on: ${{ matrix.platform }}
1414
strategy:
1515
matrix:
16-
webdriver-test: [selenium, webdriverio]
16+
platform: [ubuntu-22.04, windows-latest]
17+
webdriver-test: [ selenium, webdriverio ]
1718
steps:
1819
- uses: actions/checkout@v2
1920

2021
- name: Tauri dependencies
22+
if: matrix.platform == 'ubuntu-latest'
2123
run: >
2224
sudo apt-get update &&
2325
sudo apt-get install -y
@@ -28,6 +30,14 @@ jobs:
2830
webkit2gtk-driver
2931
xvfb
3032
33+
- name: install Tauri dependencies (Windows)
34+
if: matrix.platform == 'windows-latest'
35+
run: |
36+
Invoke-WebRequest https://msedgedriver.azureedge.net/135.0.3179.73/edgedriver_win64.zip -OutFile edgedriver_win64.zip
37+
Expand-Archive -Path edgedriver_win64.zip
38+
$msedgedriverPath = (Get-ChildItem edgedriver_win64/msedgedriver.exe -Recurse).fullname
39+
echo $msedgedriverPath >> $env:GITHUB_PATH
40+
3141
- uses: actions-rust-lang/setup-rust-toolchain@v1
3242
with:
3343
cache: false
@@ -57,8 +67,16 @@ jobs:
5767
- name: Install tauri-driver
5868
run: cargo install tauri-driver --locked
5969

60-
- name: run tests using ${{ matrix.webdriver-test }}
70+
- name: run tests using ${{ matrix.webdriver-test }} (Linux)
71+
if: matrix.platform == 'ubuntu-latest'
6172
run: |
6273
pnpm install
6374
xvfb-run pnpm test
6475
working-directory: v1/webdriver/${{ matrix.webdriver-test }}
76+
77+
- name: run tests using ${{ matrix.webdriver-test }} (Windows)
78+
if: matrix.platform == 'ubuntu-latest'
79+
run: |
80+
pnpm install
81+
pnpm test
82+
working-directory: v1/webdriver/${{ matrix.webdriver-test }}

.github/workflows/webdriver-v2.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,24 @@ on:
22
workflow_dispatch:
33
pull_request:
44
paths:
5-
- '.github/workflows/webdriver-v2.yml'
6-
- 'v2/**'
5+
- ".github/workflows/webdriver-v2.yml"
6+
- "v2/**"
77

88
name: WebDriver (v2)
99

1010
jobs:
1111
test:
1212
name: Test
13-
runs-on: ubuntu-latest
13+
runs-on: ${{ matrix.platform }}
1414
strategy:
1515
matrix:
16-
webdriver-test: [ selenium, webdriverio ]
16+
platform: [ubuntu-latest, windows-latest]
17+
webdriver-test: [selenium, webdriverio]
1718
steps:
1819
- uses: actions/checkout@v2
1920

20-
- name: Tauri dependencies
21+
- name: install Tauri dependencies (Linux)
22+
if: matrix.platform == 'ubuntu-latest'
2123
run: >
2224
sudo apt-get update &&
2325
sudo apt-get install -y
@@ -26,6 +28,14 @@ jobs:
2628
webkit2gtk-driver
2729
xvfb
2830
31+
- name: install Tauri dependencies (Windows)
32+
if: matrix.platform == 'windows-latest'
33+
run: |
34+
Invoke-WebRequest https://msedgedriver.azureedge.net/135.0.3179.73/edgedriver_win64.zip -OutFile edgedriver_win64.zip
35+
Expand-Archive -Path edgedriver_win64.zip
36+
$msedgedriverPath = (Get-ChildItem edgedriver_win64/msedgedriver.exe -Recurse).fullname
37+
echo $msedgedriverPath >> $env:GITHUB_PATH
38+
2939
- uses: actions-rust-lang/setup-rust-toolchain@v1
3040
with:
3141
cache: false
@@ -43,7 +53,7 @@ jobs:
4353
uses: actions/setup-node@v4
4454
with:
4555
node-version: 20
46-
cache: 'pnpm'
56+
cache: "pnpm"
4757
cache-dependency-path: |
4858
v2/pnpm-lock.yaml
4959
v2/webdriver/${{ matrix.webdriver-test }}/pnpm-lock.yaml

0 commit comments

Comments
 (0)