33 lines
1.0 KiB
PowerShell
33 lines
1.0 KiB
PowerShell
param([string]$MakeAppx)
|
|
$ErrorActionPreference = 'Stop'
|
|
$sourceRoot = (Resolve-Path (Join-Path $PSScriptRoot '..')).Path
|
|
function Check-Exit { if ($LASTEXITCODE -ne 0) { throw "Command failed: $LASTEXITCODE" } }
|
|
Push-Location $sourceRoot
|
|
try {
|
|
cargo fmt --all --check
|
|
Check-Exit
|
|
cargo test --locked --workspace
|
|
Check-Exit
|
|
if ($MakeAppx) {
|
|
$priorTool = $env:MSIX_TEST_MAKEAPPX
|
|
try {
|
|
$env:MSIX_TEST_MAKEAPPX = (Resolve-Path -LiteralPath $MakeAppx).Path
|
|
cargo test --locked -p package-infra --test workflow -- --ignored
|
|
Check-Exit
|
|
} finally { $env:MSIX_TEST_MAKEAPPX = $priorTool }
|
|
}
|
|
Push-Location apps/desktop
|
|
try {
|
|
npm.cmd ci
|
|
Check-Exit
|
|
npm.cmd run test
|
|
Check-Exit
|
|
npm.cmd run build
|
|
Check-Exit
|
|
} finally { Pop-Location }
|
|
cargo clippy --locked --workspace --all-targets -- -D warnings
|
|
Check-Exit
|
|
cargo build --locked -p msix-studio --features custom-protocol
|
|
Check-Exit
|
|
} finally { Pop-Location }
|