Skip to content

Feature/command palette #87

Feature/command palette

Feature/command palette #87

Workflow file for this run

name: PR Verification
on:
pull_request:
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [windows-latest]
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Setup pnpm
uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
with:
package_json_file: ./package.json
cache: true
cache_dependency_path: ./pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint frontend
run: pnpm run lint
- name: Check frontend formatting
run: pnpm run format:check
- name: Check Rust formatting
run: cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
- name: Run Clippy
run: cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings
- name: Build app (Tauri, no bundle)
run: pnpm run tauri build
system-tests:
runs-on: windows-latest
timeout-minutes: 45
needs: build
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
- name: Setup pnpm
uses: pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
with:
package_json_file: ./package.json
cache: true
cache_dependency_path: ./pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Install tauri-driver
run: cargo install tauri-driver --locked
- name: Ensure Edge WebDriver is available
shell: pwsh
run: |
function Add-DriverToPath([string]$driverPath) {
$driverDir = Split-Path $driverPath -Parent
$driverDir | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
Write-Host "Using msedgedriver at: $driverPath"
}
$existingDriver = Get-Command msedgedriver -ErrorAction SilentlyContinue
if ($existingDriver) {
Write-Host "msedgedriver already available on PATH."
msedgedriver --version
exit 0
}
$preinstalledCandidates = @(
"C:\SeleniumWebDrivers\EdgeDriver\msedgedriver.exe",
"C:\WebDriver\msedgedriver.exe"
)
foreach ($candidate in $preinstalledCandidates) {
if (Test-Path $candidate) {
Add-DriverToPath $candidate
exit 0
}
}
$edgeExe = "${env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe"
if (-not (Test-Path $edgeExe)) {
$edgeExe = "${env:ProgramFiles}\Microsoft\Edge\Application\msedge.exe"
}
if (-not (Test-Path $edgeExe)) {
throw "Could not find Microsoft Edge executable."
}
$edgeVersion = (Get-Item $edgeExe).VersionInfo.ProductVersion
$majorVersion = $edgeVersion.Split('.')[0]
$driverDir = Join-Path $env:RUNNER_TEMP "msedgedriver"
New-Item -ItemType Directory -Path $driverDir -Force | Out-Null
$driverZipPath = Join-Path $driverDir "edgedriver.zip"
$downloadHosts = @(
"https://msedgedriver.azureedge.net",
"https://msedgedriver.microsoft.com"
)
$downloaded = $false
$errors = @()
foreach ($host in $downloadHosts) {
try {
$latestReleaseUrl = "$host/LATEST_RELEASE_$majorVersion"
$driverVersion = (Invoke-WebRequest -Uri $latestReleaseUrl -UseBasicParsing).Content.Trim()
$driverZipUrl = "$host/$driverVersion/edgedriver_win64.zip"
Invoke-WebRequest -Uri $driverZipUrl -OutFile $driverZipPath
Expand-Archive -Path $driverZipPath -DestinationPath $driverDir -Force
$driverBinary = Join-Path $driverDir "msedgedriver.exe"
if (Test-Path $driverBinary) {
Add-DriverToPath $driverBinary
$downloaded = $true
break
}
} catch {
$errors += "${host}: $($_.Exception.Message)"
}
}
if (-not $downloaded) {
throw "Unable to install msedgedriver. Attempts: $($errors -join ' | ')"
}
- name: Verify Edge WebDriver
run: msedgedriver --version
- name: Run system tests
env:
TAURI_TEST_KEEP_DATA: '1'
run: pnpm run test:system
- name: Upload system test artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: system-test-artifacts-${{ github.run_id }}
path: |
.wdio-artifacts
.system-test-data
if-no-files-found: ignore
retention-days: 7