-
Notifications
You must be signed in to change notification settings - Fork 91
43 lines (32 loc) · 1023 Bytes
/
build.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
name: Build
on:
push:
pull_request:
permissions:
contents: read
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
# Set the build number in MinVer.
MINVERBUILDMETADATA: build.${{github.run_number}}
steps:
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@3447fd6a9f9e57506b15f895c5b76d3b197dc7c2 # v3
- name: Restore packages
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration Debug
- name: Run tests
run: dotnet test --no-build --configuration Debug --collect:"XPlat Code Coverage"
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}