-
Notifications
You must be signed in to change notification settings - Fork 56
46 lines (36 loc) · 1.19 KB
/
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
44
45
46
name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-library:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
3.1.x
5.0.x
6.0.x
7.0.x
8.0.x
- name: Display .NET version
run: dotnet --version
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build EntityFrameworkCore.DataEncryption.sln --configuration Release -f net8.0 --no-restore
- name: Run unit tests
run: dotnet test --configuration Release --collect:"XPlat Code Coverage" --settings ./test/EntityFrameworkCore.DataEncryption.Test/runsettings.xml
- name: Copy coverage results
run: cp ./test/EntityFrameworkCore.DataEncryption.Test/TestResults/**/*.xml ./test/EntityFrameworkCore.DataEncryption.Test/TestResults/
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
files: ./test/EntityFrameworkCore.DataEncryption.Test/TestResults/coverage.opencover.xml
fail_ci_if_error: true