|
83 | 83 |
|
84 | 84 | - name: Build release binary |
85 | 85 | run: cargo build --release --manifest-path cli/Cargo.toml --target ${{ matrix.target }} |
| 86 | + |
| 87 | + - name: Run Rust tests |
| 88 | + run: cargo test --manifest-path cli/Cargo.toml --target ${{ matrix.target }} |
| 89 | + |
| 90 | + windows-integration: |
| 91 | + name: Windows Integration Test |
| 92 | + runs-on: windows-latest |
| 93 | + needs: rust |
| 94 | + |
| 95 | + steps: |
| 96 | + - name: Checkout repository |
| 97 | + uses: actions/checkout@v4 |
| 98 | + |
| 99 | + - name: Setup pnpm |
| 100 | + uses: pnpm/action-setup@v4 |
| 101 | + with: |
| 102 | + version: 9 |
| 103 | + |
| 104 | + - name: Setup Node.js |
| 105 | + uses: actions/setup-node@v4 |
| 106 | + with: |
| 107 | + node-version: 22 |
| 108 | + cache: pnpm |
| 109 | + |
| 110 | + - name: Setup Rust toolchain |
| 111 | + uses: dtolnay/rust-toolchain@stable |
| 112 | + with: |
| 113 | + targets: x86_64-pc-windows-msvc |
| 114 | + |
| 115 | + - name: Cache Cargo dependencies |
| 116 | + uses: actions/cache@v4 |
| 117 | + with: |
| 118 | + path: | |
| 119 | + ~/.cargo/bin/ |
| 120 | + ~/.cargo/registry/index/ |
| 121 | + ~/.cargo/registry/cache/ |
| 122 | + ~/.cargo/git/db/ |
| 123 | + cli/target/ |
| 124 | + key: windows-cargo-x86_64-pc-windows-msvc-${{ hashFiles('cli/Cargo.lock') }} |
| 125 | + restore-keys: | |
| 126 | + windows-cargo-x86_64-pc-windows-msvc- |
| 127 | +
|
| 128 | + - name: Build Rust CLI |
| 129 | + run: cargo build --release --manifest-path cli/Cargo.toml --target x86_64-pc-windows-msvc |
| 130 | + |
| 131 | + - name: Install npm dependencies |
| 132 | + run: pnpm install |
| 133 | + |
| 134 | + - name: Build TypeScript |
| 135 | + run: pnpm build |
| 136 | + |
| 137 | + - name: Copy CLI binary to bin directory |
| 138 | + run: | |
| 139 | + Copy-Item cli/target/x86_64-pc-windows-msvc/release/agent-browser.exe bin/agent-browser-win32-x64.exe |
| 140 | +
|
| 141 | + - name: Test agent-browser install command |
| 142 | + run: | |
| 143 | + $env:PATH = "$pwd\bin;$env:PATH" |
| 144 | + bin/agent-browser-win32-x64.exe install |
| 145 | + shell: pwsh |
| 146 | + |
| 147 | + - name: Verify Chromium was installed |
| 148 | + run: | |
| 149 | + $playwrightPath = "$env:LOCALAPPDATA\ms-playwright" |
| 150 | + if (Test-Path $playwrightPath) { |
| 151 | + Write-Host "Playwright browsers installed at: $playwrightPath" |
| 152 | + Get-ChildItem $playwrightPath -Recurse -Depth 2 | Select-Object -First 20 |
| 153 | + } else { |
| 154 | + Write-Error "Playwright browsers not found!" |
| 155 | + exit 1 |
| 156 | + } |
| 157 | + shell: pwsh |
0 commit comments