-
Notifications
You must be signed in to change notification settings - Fork 6
60 lines (47 loc) · 1.55 KB
/
Copy pathbuild.yml
File metadata and controls
60 lines (47 loc) · 1.55 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
name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v7
- name: Set up .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.0.x'
- name: Verify that the diagrams match their specification
run: python3 tools/generate_diagrams.py --check
- name: Restore
run: dotnet restore src/DotnetDesignPatterns.sln
- name: Build
run: dotnet build src/DotnetDesignPatterns.sln --configuration Release --no-restore
# global.json selects the Microsoft.Testing.Platform runner. The VSTest
# options that used to be here, --logger and --collect, belong to the old
# runner and are rejected by this one. Reporting and coverage are available
# as platform extensions and can come back once the packages are pinned.
- name: Test
run: >
dotnet test src/DotnetDesignPatterns.sln
--configuration Release
--no-build
format:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v7
- name: Set up .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: '10.0.x'
- name: Verify formatting against .editorconfig
run: dotnet format src/DotnetDesignPatterns.sln --verify-no-changes --severity error