-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (43 loc) · 1.35 KB
/
net.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
48
49
50
51
name: .NET - coverlet test coverage
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0'
- name: Add coverlet dependencies
working-directory: NET/coverlet/UnitTestProject
run: |
dotnet add package coverlet.msbuild; dotnet add package coverlet.collector
- name: Build solution
working-directory: NET/coverlet
run: dotnet build
- name: Run tests with code coverage
run: dotnet test /p:CollectCoverage=true /p:CoverletOutput=../.qodana/code-coverage/ /p:CoverletOutputFormat=lcov
working-directory: NET/coverlet
- name: Archive coverage data
uses: actions/upload-artifact@v2
with:
name: net-coverage-data
path: NET/coverlet/.qodana/code-coverage
- name: Qodana Scan
uses: JetBrains/qodana-action@main
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_NET }}
with:
args: "-i,NET/coverlet,--linter,jetbrains/qodana-dotnet:latest"
pr-mode: false