Skip to content

WinUI DevTools: inspect, comment on and live-edit a running WinUI app #283

WinUI DevTools: inspect, comment on and live-edit a running WinUI app

WinUI DevTools: inspect, comment on and live-edit a running WinUI app #283

Workflow file for this run

name: Plugin Check
# Fast, build-free structural check of plugin manifests and skills. Command examples
# are checked against the built CLI in the post-build validate-docs job. This always runs on PRs, so it is
# safe to mark as a required check, and skips quickly when no relevant file changed.
# The post-build validate-docs job in build-package.yml still runs the same script.
on:
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
validate-plugins:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# The default PR checkout is the merge commit; depth 2 brings in its base parent,
# so HEAD^1..HEAD is exactly what the PR changes.
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 2
persist-credentials: false
- name: Validate plugin packages and skills
shell: pwsh
run: |
$relevant = '^(plugins/|scripts/validate-plugin-package\.ps1$|\.github/workflows/plugin-check\.yml$)'
$changed = @(git diff --name-only HEAD^1 HEAD)
if ($LASTEXITCODE -ne 0) { throw "Could not list the files this PR changes." }
$matched = @($changed | Where-Object { $_ -match $relevant })
if ($matched.Count -eq 0) {
$message = "No skill-related changes; skipping."
Write-Host $message
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value $message
exit 0
}
Write-Host "Skill-related changes:"
$matched | ForEach-Object { Write-Host " $_" }
./scripts/validate-plugin-package.ps1
exit $LASTEXITCODE
winui-tests:
runs-on: windows-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 2
persist-credentials: false
- name: Run WinUI skill script tests
shell: pwsh
run: |
$relevant = '^(plugins/winui/|scripts/tests/Test-(WinuiUiTestingSandbox|SetupVersionDetection)\.ps1$|\.github/workflows/plugin-check\.yml$)'
$changed = @(git diff --name-only HEAD^1 HEAD)
if ($LASTEXITCODE -ne 0) { throw "Could not list the files this PR changes." }
if (@($changed | Where-Object { $_ -match $relevant }).Count -eq 0) {
$message = "No WinUI plugin changes; skipping."
Write-Host $message
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value $message
exit 0
}
foreach ($test in 'Test-WinuiUiTestingSandbox', 'Test-SetupVersionDetection') {
Write-Host "::group::$test"
pwsh -NoProfile -File "./scripts/tests/$test.ps1"
if ($LASTEXITCODE -ne 0) { throw "$test failed." }
Write-Host "::endgroup::"
}