-
Notifications
You must be signed in to change notification settings - Fork 16
69 lines (66 loc) · 2.27 KB
/
ci.yml
File metadata and controls
69 lines (66 loc) · 2.27 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
61
62
63
64
65
66
67
68
69
name: CI
on:
workflow_call:
inputs:
build-ref:
required: true
type: string
workflow_dispatch:
push:
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
lfs: true
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x # global-json-file: wouldn't use the latestMinor with setup-dotnet@v4
- uses: dotnet/nbgv@v0.4
id: nbgv
- run: dotnet restore /p:ContinuousIntegrationBuild=true
- run: dotnet build -c Release --no-restore /p:ContinuousIntegrationBuild=true
- run: >-
dotnet test
-c Release --no-restore --no-build
/p:ContinuousIntegrationBuild=true
/p:CoverletOutputFormat=\"opencover,cobertura\"
-s CodeCoverage.runsettings
--collect:"XPlat Code Coverage"
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
--
RunConfiguration.CollectSourceInformation=true
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@v5
with:
reports: "**/coverage.cobertura.xml"
targetdir: coveragereport
reporttypes: "Html;MarkdownSummaryGithub"
license: ${{ secrets.ReportGeneratorLicense }}
- uses: actions/upload-artifact@v4
with:
name: CoverageReport-${{ steps.nbgv.outputs.Version }}
path: coveragereport
- name: Publish coverage in build summary # Only applicable if 'MarkdownSummaryGithub' or one of the other Markdown report types is generated
run: cat coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY
shell: bash
- name: Upload coverage reports to Codecov
if: ${{ env.CODECOV_TOKEN }}
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
slug: georg-jung/FaceAiSharp
- run: dotnet pack -c Release --no-restore --no-build /p:ContinuousIntegrationBuild=true
- uses: actions/upload-artifact@v4
with:
name: nupkg
path: bin/Packages/Release/**/*