-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (75 loc) Β· 2.8 KB
/
Copy pathapps-windows.yml
File metadata and controls
88 lines (75 loc) Β· 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: apps-windows
# P0/0004 β path-filtered CI for the Windows (WinUI 3 / .NET 10) program
# (ADR-001/007/010/012). Windows runner per ADR-012. No-op-but-valid until
# the P2 Windows program adds a buildable .sln/.csproj; the guard step
# documents that state instead of a bare `exit 0`.
on:
pull_request:
paths:
- 'apps/windows/**'
- 'apps/shared/**'
- 'api/openapi/**'
- '.github/workflows/apps-windows.yml'
push:
branches: [feat/apps-windows]
paths:
- 'apps/windows/**'
- 'apps/shared/**'
- 'api/openapi/**'
- '.github/workflows/apps-windows.yml'
workflow_dispatch:
concurrency:
group: apps-windows-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
windows:
name: Windows WinUI (build + lint + test)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ runner.os }}-${{ hashFiles('apps/windows/**/Directory.Packages.props', 'apps/windows/**/*.csproj') }}
restore-keys: |
nuget-${{ runner.os }}-
- name: Detect buildable project (guard)
id: detect
shell: bash
run: |
set -euo pipefail
if ls apps/windows/**/*.sln apps/windows/*.sln apps/windows/**/*.csproj apps/windows/*.csproj >/dev/null 2>&1; then
echo "buildable=true" >> "$GITHUB_OUTPUT"
echo "Buildable .NET project/solution detected under apps/windows β running full triad."
else
echo "buildable=false" >> "$GITHUB_OUTPUT"
echo "GUARD: no buildable .sln/.csproj under apps/windows yet (P2 not landed)."
echo "GUARD: passing as a documented no-op; will fail once a project exists but does not build."
fi
- name: Restore
if: steps.detect.outputs.buildable == 'true'
working-directory: apps/windows
run: dotnet restore
- name: Build (dotnet build -c Release)
if: steps.detect.outputs.buildable == 'true'
working-directory: apps/windows
run: dotnet build -c Release --no-restore
- name: Strict lint/format (dotnet format --verify-no-changes)
if: steps.detect.outputs.buildable == 'true'
working-directory: apps/windows
run: dotnet format --verify-no-changes
- name: Unit tests (dotnet test)
if: steps.detect.outputs.buildable == 'true'
working-directory: apps/windows
run: dotnet test -c Release --no-build
- name: CI honesty marker
if: success()
run: echo "EXIT=0"