-
Notifications
You must be signed in to change notification settings - Fork 35
134 lines (109 loc) · 4.75 KB
/
Copy pathdotnet.yml
File metadata and controls
134 lines (109 loc) · 4.75 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: Trion CI
on:
push:
branches: [ main, dev ]
pull_request:
branches: [ main, dev ]
jobs:
# ── Windows: full solution including WPF Desktop + Updater ──────────────────
build-windows:
name: Build & Test (Windows)
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install .NET workloads
run: dotnet workload install aspire wasm-tools
- name: Restore
run: dotnet restore src/Trion.sln
- name: Build
run: dotnet build src/Trion.sln -c Release --no-restore
- name: Test
run: dotnet test src/Trion.sln -c Release --no-build --logger trx --collect:"XPlat Code Coverage"
- name: Publish Desktop (Windows only)
run: dotnet publish src/Trion.Desktop/Trion.Desktop.csproj -c Release -o artifacts/desktop
- name: Publish Web
run: dotnet publish src/Trion.Web/Trion.Web.csproj -c Release -o artifacts/web
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-windows
path: '**/*.trx'
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: '**/coverage.cobertura.xml'
- name: Upload Desktop artifact
uses: actions/upload-artifact@v4
with:
name: Trion-Desktop-windows
path: artifacts/desktop
- name: Upload Web artifact (Windows)
uses: actions/upload-artifact@v4
with:
name: Trion-Web-windows
path: artifacts/web
# ── Linux: cross-platform projects only — no WPF / Windows TFM ──────────────
build-linux:
name: Build & Test (Linux)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Install .NET workloads
run: dotnet workload install aspire wasm-tools
- name: Restore (cross-platform)
run: |
dotnet restore src/Trion.Core/Trion.Core.csproj
dotnet restore src/Trion.API/Trion.API.csproj
dotnet restore src/Trion.Agent/Trion.Agent.csproj
dotnet restore src/Trion.Platform/Trion.Platform.csproj
dotnet restore src/Trion.UI/Trion.UI.csproj
dotnet restore src/Trion.Web/Trion.Web.csproj
dotnet restore tests/Trion.Core.Tests/Trion.Core.Tests.csproj
dotnet restore tests/Trion.Agent.Tests/Trion.Agent.Tests.csproj
dotnet restore tests/Trion.Platform.Tests/Trion.Platform.Tests.csproj
- name: Build (cross-platform)
run: |
dotnet build src/Trion.Core/Trion.Core.csproj -c Release --no-restore
dotnet build src/Trion.API/Trion.API.csproj -c Release --no-restore
dotnet build src/Trion.Agent/Trion.Agent.csproj -c Release --no-restore
dotnet build src/Trion.Platform/Trion.Platform.csproj -c Release --no-restore
dotnet build src/Trion.UI/Trion.UI.csproj -c Release --no-restore
dotnet build src/Trion.Web/Trion.Web.csproj -c Release --no-restore
dotnet build tests/Trion.Core.Tests/Trion.Core.Tests.csproj -c Release --no-restore
dotnet build tests/Trion.Agent.Tests/Trion.Agent.Tests.csproj -c Release --no-restore
dotnet build tests/Trion.Platform.Tests/Trion.Platform.Tests.csproj -c Release --no-restore
- name: Test (cross-platform)
run: |
dotnet test tests/Trion.Core.Tests/Trion.Core.Tests.csproj -c Release --no-build --logger trx --collect:"XPlat Code Coverage"
dotnet test tests/Trion.Agent.Tests/Trion.Agent.Tests.csproj -c Release --no-build --logger trx --collect:"XPlat Code Coverage"
dotnet test tests/Trion.Platform.Tests/Trion.Platform.Tests.csproj -c Release --no-build --logger trx --collect:"XPlat Code Coverage"
- name: Publish Web
run: dotnet publish src/Trion.Web/Trion.Web.csproj -c Release -o artifacts/web
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-linux
path: '**/*.trx'
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: '**/coverage.cobertura.xml'
- name: Upload Web artifact (Linux)
uses: actions/upload-artifact@v4
with:
name: Trion-Web-linux
path: artifacts/web