-
-
Notifications
You must be signed in to change notification settings - Fork 210
47 lines (36 loc) · 1.3 KB
/
dotnet-ubuntu.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
name: Ubuntu x64
on: [ push ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET Core 8.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Setup
run:
- choco install opencover.portable
- choco install codecov
- name: Restore dependencies
run: dotnet restore ./src
- name: Build solution
run: dotnet build -c Debug ./src --verbosity minimal
- name: Run tests and collect coverage
run: dotnet test -c Debug ./src --verbosity normal --no-build --no-restore /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:CoverletOutput=./TestResults/coverage.cobertura.xml
- name: List files in TestResults directory
run: ls -R ./TestResults
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./TestResults/coverage.cobertura.xml
flags: unit
name: codecov-umbrella
fail_ci_if_error: true # optional (default: false)
verbose: true