-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (52 loc) · 1.66 KB
/
dotnet.yml
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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
paths-ignore:
- "StepLang.Wiki/**"
- "StepLang.Homepage/**"
branches: [ "main" ]
pull_request:
paths-ignore:
- "StepLang.Wiki/**"
- "StepLang.Homepage/**"
branches: [ "main" ]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: [8.x]
runs-on: ${{ matrix.os }}
name: Build & Test on .NET ${{ matrix.version }} (${{ matrix.os }})
outputs:
badge: ${{ steps.coverage.outputs.badge }}
line_rate: ${{ steps.coverage.outputs.line_rate }}
branch_rate: ${{ steps.coverage.outputs.branch_rate }}
complexity: ${{ steps.coverage.outputs.complexity }}
health: ${{ steps.coverage.outputs.health }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.version }}
- name: Cache NuGet packages
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Test --no-restore
- name: Test
run: dotnet test --configuration Test --no-build