-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (54 loc) · 1.67 KB
/
ci.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
52
53
54
55
56
57
58
name: Continuous Integration
on:
push:
branches:
- develop
paths-ignore:
- '**.md'
- '**/dependabot.yml'
- '**/codacy-security-scan.yml'
- '.github/workflows/release.yaml'
pull_request:
paths-ignore:
- '**.md'
- '**/dependabot.yml'
- '**/codacy-security-scan.yml'
- '.github/workflows/release.yaml'
jobs:
unit-tests:
name: Unit Tests
runs-on: windows-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Install .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Test
run: |
dotnet test -c release `
--logger:trx `
--results-directory ${{ runner.temp }}\TestResults `
-p:CollectCoverage=true `
-p:CoverletOutputFormat=opencover `
-p:CoverletOutput=${{ github.workspace }}\CodeCoverage\coverage.opencover.xml
- name: Publish Test Results
uses: dorny/test-reporter@v1
if: ${{ github.actor != 'dependabot[bot]' && always() }}
with:
name: Test Results
path: ${{ runner.temp }}\TestResults\*.trx
reporter: dotnet-trx
path-replace-backslashes: true
- name: Codacy Coverage
if: ${{ github.actor != 'dependabot[bot]' && always() }}
uses: codacy/codacy-coverage-reporter-action@v1
with:
project-token: ${{ secrets.CODACY_TOKEN }}
coverage-reports: 'CodeCoverage/coverage.opencover.*.xml'