-
-
Notifications
You must be signed in to change notification settings - Fork 1
134 lines (105 loc) · 3.07 KB
/
Copy pathci.yml
File metadata and controls
134 lines (105 loc) · 3.07 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
# workflows/ci.yml
#
# CI
# Run linting and test matrix across supported .NET versions.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Restore .NET tools
run: dotnet tool restore
- name: CSharpier format check
run: dotnet csharpier check .
- name: Restore
run: dotnet restore build.slnf
- name: Verify build (no warnings)
run: dotnet build build.slnf --configuration Release --no-restore -warnaserror
build:
name: .NET ${{ matrix.framework }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dotnet: "8.0.x"
framework: "net8.0"
- dotnet: "9.0.x"
framework: "net9.0"
- dotnet: "10.0.x"
framework: "net10.0"
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore
run: dotnet restore build.slnf
- name: Build
run: dotnet build build.slnf --configuration Release --framework ${{ matrix.framework }} --no-restore
- name: Test
run: |
dotnet test \
--no-build \
--configuration Release \
--framework ${{ matrix.framework }} \
--results-directory TestResults/${{ matrix.framework }} \
--coverlet \
--coverlet-output-format cobertura
- name: Run Examples
run: scripts/run_examples.sh
- name: Upload to Codecov
uses: codecov/codecov-action@v7
with:
directory: TestResults/${{ matrix.framework }}
flags: ${{ matrix.framework }}
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
windows-smoke:
name: Windows Smoke
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Restore
run: dotnet restore build.slnf -p:TargetFramework=net10.0
- name: Build
run: dotnet build build.slnf --configuration Release --framework net10.0 --no-restore
check-api-coverage:
name: Check API Coverage
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Check API coverage
run: uv run --with json5 scripts/check_api_coverage.py