feat: support wezterm #40
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
check: | |
strategy: | |
matrix: | |
platform: | |
- macos | |
- ubuntu | |
- windows | |
toolchain: | |
- stable | |
- 1.72.0 | |
name: Test on ${{ matrix.platform }} with Rust ${{ matrix.toolchain }} | |
runs-on: "${{ matrix.platform }}-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure toolchain | |
run: | | |
rustup toolchain install --profile minimal --no-self-update ${{ matrix.toolchain }} | |
rustup default ${{ matrix.toolchain }} | |
- if: "matrix.platform != 'windows'" | |
run: cargo test | |
# the enumeration of tests is because windows_vt tests don't work in CI somehow | |
# the Invoke-NativeCommand thing is because powershell is fucking insane | |
# ref: https://stackoverflow.com/questions/11450153/powershell-analogue-of-bashs-set-e | |
- if: "matrix.platform == 'windows'" | |
shell: powershell | |
run: | | |
function Invoke-NativeCommand { | |
$command = $args[0] | |
$arguments = $args[1..($args.Length)] | |
& $command @arguments | |
if ($LastExitCode -ne 0) { | |
Write-Error "Exit code $LastExitCode while running $command $arguments" | |
} | |
} | |
Invoke-NativeCommand cargo test --doc | |
Invoke-NativeCommand cargo test --test platformed terminfo | |
Invoke-NativeCommand cargo test --test platformed xterm | |
Invoke-NativeCommand cargo test --test platformed tput | |
Invoke-NativeCommand cargo test --test platformed windows_cls | |
Invoke-NativeCommand cargo test --test platformed vt_ris | |
cd tests/win10 | |
Invoke-NativeCommand cargo run |