-
Notifications
You must be signed in to change notification settings - Fork 2
78 lines (63 loc) · 2.74 KB
/
ci.yml
File metadata and controls
78 lines (63 loc) · 2.74 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
name: CI
on:
push:
branches: ['**']
pull_request:
branches: [main, develop]
permissions:
contents: read
pull-requests: write
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
# Tells Terminal.Gui drivers to skip real-terminal probing/IO
# so the ANSI driver runs on Windows runners without a TTY.
DisableRealDriverIO: "1"
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
dotnet-quality: 'preview'
- name: Restore
run: dotnet restore Terminal.Gui.Editor.slnx
- name: Restore dotnet tools
run: dotnet tool restore
- name: Build
run: dotnet build Terminal.Gui.Editor.slnx --no-restore
# Style gate runs once (Linux). dotnet format catches whitespace/analyzer drift;
# jb cleanupcode catches what dotnet format misses (var, expression-bodied members,
# XML doc spacing, using sorting). Both must produce a clean working tree.
- name: Verify code style — dotnet format
if: matrix.os == 'ubuntu-latest'
run: |
dotnet format Terminal.Gui.Editor.slnx --no-restore --exclude third_party/ --verify-no-changes
- name: Verify code style — ReSharper cleanupcode
if: matrix.os == 'ubuntu-latest'
run: |
# Use our custom profile name defined in the team-shared .DotSettings file.
# Previous attempts used "Built-in: Full Cleanup" which worked but didn't pick
# up our tweaks (CSUseAutoProperty OFF, etc.). The custom-named profile resolves
# reliably from the .DotSettings file.
dotnet jb cleanupcode Terminal.Gui.Editor.slnx \
--profile="TG.Editor Full Cleanup" \
--no-build \
--exclude="third_party/**/*" \
|| true
if ! git diff --exit-code; then
echo "::error::ReSharper code cleanup found style drift. Run 'dotnet jb cleanupcode Terminal.Gui.Editor.slnx --profile=\"TG.Editor Full Cleanup\"' locally and commit the result."
exit 1
fi
- name: Terminal.Gui.Editor.Tests
run: dotnet run --project tests/Terminal.Gui.Editor.Tests --no-build
- name: Terminal.Gui.Editor.IntegrationTests
run: dotnet run --project tests/Terminal.Gui.Editor.IntegrationTests --no-build
# NOTE: Performance smoke tests and the BenchmarkDotNet baseline compare live in a
# dedicated workflow: .github/workflows/perf.yml (ubuntu-latest only). They were split
# out so this CI workflow stays purely correctness-focused and fast across all three OSes.