-
-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (40 loc) · 1.23 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
# 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:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: |
cd ./src
dotnet restore
- name: Build
run: |
cd ./src
dotnet build --no-restore
- name: Test
run: |
cd ./src
dotnet test --no-build -m:1 -s ../tests/tests.runsettings \
/p:CollectCoverage=true \
/p:CoverletOutput=../TestResults/ \
/p:MergeWith="../TestResults/coverage.json" \
/p:CoverletOutputFormat=\"opencover,json\"
- name: Create Test Coverage Badge
uses: simon-k/[email protected]
id: create_coverage_badge
with:
label: Unit Test Coverage
color: brightgreen
path: ./tests/TestResults/coverage.opencover.xml
gist-filename: eveniredb-code-coverage.json
gist-id: ebd585c5ad0069d0e8486e43cade5793
gist-auth-token: ${{ secrets.GIST_AUTH_TOKEN }}