-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (67 loc) · 3 KB
/
Copy pathci.yml
File metadata and controls
79 lines (67 loc) · 3 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build-and-test:
name: build & test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Set up .NET 10 SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore SharpMUTerm.slnx
- name: Build
run: dotnet build SharpMUTerm.slnx -c Release --no-restore
# TUnit runs on Microsoft.Testing.Platform; execute each test project directly
# (the classic `dotnet test`/VSTest path is not used by MTP on .NET 10).
#
# Every suite carries `if: ${{ !cancelled() }}` so one failure does not hide the rest. Without it
# the job stops at the first red step, and a Core failure means Graphics through Tui simply do
# not run — which is how a Windows file-sharing defect in Core kept two Tui failures invisible for
# days: nobody knew they were there until Core went green. A cancelled run still stops.
- name: Test — Core
shell: bash
run: dotnet run -c Release --no-build --project tests/SharpMUTerm.Core.Tests/SharpMUTerm.Core.Tests.csproj
- name: Test — Graphics
if: ${{ !cancelled() }}
shell: bash
run: dotnet run -c Release --no-build --project tests/SharpMUTerm.Graphics.Tests/SharpMUTerm.Graphics.Tests.csproj
- name: Test — Scripting
if: ${{ !cancelled() }}
shell: bash
run: dotnet run -c Release --no-build --project tests/SharpMUTerm.Scripting.Tests/SharpMUTerm.Scripting.Tests.csproj
- name: Test — Web
if: ${{ !cancelled() }}
shell: bash
run: dotnet run -c Release --no-build --project tests/SharpMUTerm.Web.Tests/SharpMUTerm.Web.Tests.csproj
- name: Test — Tui
if: ${{ !cancelled() }}
shell: bash
run: dotnet run -c Release --no-build --project tests/SharpMUTerm.Tui.Tests/SharpMUTerm.Tui.Tests.csproj
# End-to-end guard: the headless snapshot must render the workspace (rail, worlds, command
# surface) and exit — catches both UI-render regressions and any return of the stdin-block hang.
- name: Smoke — headless snapshot
if: ${{ !cancelled() }}
shell: bash
run: |
dotnet run -c Release --no-build --project src/SharpMUTerm.Tui/SharpMUTerm.Tui.csproj -- \
--snapshot --demo-config --size 120x30 --out snapshot.ans </dev/null
test -s snapshot.ans || { echo "snapshot produced no output"; exit 1; }
for token in CONNECTIONS Aetherfall Corvid palette; do
grep -qF "$token" snapshot.ans || { echo "snapshot missing token: $token"; exit 1; }
done
echo "headless snapshot smoke passed ($(wc -c < snapshot.ans) bytes)"