-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (48 loc) · 1.77 KB
/
dotnet.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
name: .NET 8 CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build --configuration Release
- name: Install reportgenerator
run: dotnet tool install -g dotnet-reportgenerator-globaltool
- name: Test
run: |
dotnet test --configuration Release \
--no-build \
--logger "console;verbosity=detailed" \
--collect:"XPlat Code Coverage" \
--settings coverlet.runsettings.xml \
--results-directory MsTestResults
reportgenerator -reports:MsTestResults/*/coverage.cobertura.xml \
-targetdir:Coverlet-html
- name: Archive artifacts (code coverage)
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: Coverlet-html
- name: Self check
run: |
sudo apt-get update
sudo apt-get install xsltproc
xsltproc transform.xslt StyleChecker/StyleChecker/StyleChecker.csproj > 1.xml
xsltproc transform.xslt StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj > 2.xml
cp 1.xml StyleChecker/StyleChecker/StyleChecker.csproj
cp 2.xml StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj
dotnet add StyleChecker/StyleChecker/StyleChecker.csproj package StyleChecker --version ${{ env.STYLECHECKER_VERSION }}
dotnet add StyleChecker/StyleChecker.Test/StyleChecker.Test.csproj package StyleChecker --version ${{ env.STYLECHECKER_VERSION }}
dotnet build --configuration Release
env:
STYLECHECKER_VERSION: 2.0.1-alpha