-
-
Notifications
You must be signed in to change notification settings - Fork 82
45 lines (36 loc) · 1.17 KB
/
dotnetcore.yml
File metadata and controls
45 lines (36 loc) · 1.17 KB
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
name: .NET Core
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '10.0.x'
- name: Build with dotnet
run: dotnet build src/MockQueryable/*.sln --configuration Release
- name: Test with coverage (coverlet)
run: |
mkdir -p TestResults
COVERAGE_DIR="$(pwd)/TestResults"
dotnet test src/MockQueryable/*.sln \
--configuration Release \
--no-build \
/p:CollectCoverage=true \
/p:CoverletOutput="$COVERAGE_DIR/coverage-" \
/p:CoverletOutputFormat=opencover
ls -R "$COVERAGE_DIR" || echo Empty folder
- name: Upload coverage results (artifact)
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: TestResults
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: TestResults/**/*.opencover.xml
flags: unittests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}