-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (30 loc) · 1.18 KB
/
Copy pathdotnetcore.yml
File metadata and controls
30 lines (30 loc) · 1.18 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
name: Build and Test
on: [push, pull_request]
jobs:
Build_and_Test:
strategy:
matrix:
# Debug and Release might be different due to conditional compilation, so validate both.
configuration: [Debug, Release]
name: Build and Test (${{ matrix.configuration }})
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10
dotnet-quality: ga
- name: Restore Dependencies
run: dotnet restore
# `dotnet format` runs the full formatter pipeline (whitespace + style + analyzers)
# which catches a few IDE-prefixed rules, notably IDE0055 (Fix formatting), that
# `dotnet build` skips even with EnforceCodeStyleInBuild=true. This step keeps CI
# parity with what Visual Studio's IDE-side analysis flags.
- name: Format Check
run: dotnet format --verify-no-changes --no-restore
- name: Build
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore -p:EnforceCodeStyleInBuild=false
- name: Test
run: dotnet test --configuration ${{ matrix.configuration }} --no-build --nologo