-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.48 KB
/
Copy pathqodana_code_quality.yml
File metadata and controls
60 lines (51 loc) · 1.48 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Coverlet & Qodana
permissions:
contents: read
security-events: write
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0'
- name: Add coverlet dependencies
working-directory: ./DotNetExtensionsTests
run: |
dotnet add package coverlet.msbuild
dotnet add package coverlet.collector
- name: Build solution
working-directory: .
run: dotnet build
- name: Run tests with code coverage
working-directory: .
run: |
dotnet test /p:CollectCoverage=true \
/p:CoverletOutput=../.qodana/code-coverage/ \
/p:CoverletOutputFormat=lcov
- name: Archive coverage data
uses: actions/upload-artifact@v4
with:
name: net-coverage-data
path: .qodana/code-coverage/
- name: Run Qodana Scan
uses: JetBrains/qodana-action@v2024.3
with:
args: "-i,.,--linter,jetbrains/qodana-dotnet:2025.3"
pr-mode: false
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_318327343 }}
QODANA_ENDPOINT: 'https://qodana.cloud'