-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
79 lines (65 loc) · 3.56 KB
/
build.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Update Versions
env:
VERSION_BUILD: ${{github.run_number}}
run: |
sed -i.bak "s:</VersionPrefix>:.$VERSION_BUILD</VersionPrefix>:g" Directory.Build.props
- name: Set up .NET
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install Code Coverarage Tool
run: dotnet tool install --global dotnet-reportgenerator-globaltool
- name: Restore NuGets
run: nuget restore SQLite.sln
- name: Build and Test
run: |
set -e
cd tests/SQLite.Tests
dotnet test /p:AltCover=true /p:AltCoverForce=true "/p:AltCoverTypeFilter=SQLite.Tests.*"
- name: Generate Code Coverage Report
uses: danielpalme/[email protected]
if: github.event_name == 'push'
with:
reports: 'tests/SQLite.Tests/coverage.xml' # REQUIRED # The coverage reports that should be parsed (separated by semicolon). Globbing is supported.
targetdir: 'CoverageReport' # REQUIRED # The directory where the generated report should be saved.
reporttypes: 'HtmlInline;Cobertura' # The output formats and scope (separated by semicolon) Values: Badges, Clover, Cobertura, CsvSummary, Html, HtmlChart, HtmlInline, HtmlInline_AzurePipelines, HtmlInline_AzurePipelines_Dark, HtmlSummary, JsonSummary, Latex, LatexSummary, lcov, MHtml, PngChart, SonarQube, TeamCitySummary, TextSummary, Xml, XmlSummary
sourcedirs: '' # Optional directories which contain the corresponding source code (separated by semicolon). The source directories are used if coverage report contains classes without path information.
historydir: '' # Optional directory for storing persistent coverage information. Can be used in future reports to show coverage evolution.
plugins: '' # Optional plugin files for custom reports or custom history storage (separated by semicolon).
assemblyfilters: '+SQLite.Tests;-NUnit3.TestAdapter' # Optional list of assemblies that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
classfilters: '+*;-SQLite.Tests.*' # Optional list of classes that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
filefilters: '+*' # Optional list of files that should be included or excluded in the report. Exclusion filters take precedence over inclusion filters. Wildcards are allowed.
verbosity: 'Info' # The verbosity level of the log messages. Values: Verbose, Info, Warning, Error, Off
title: '' # Optional title.
tag: '${{ github.run_number }}_${{ github.run_id }}' # Optional tag or build version.
customSettings: '' # Optional custom settings (separated by semicolon). See: https://github.com/danielpalme/ReportGenerator/wiki/Settings.
- name: Deploy Code Coverage Report
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: CoverageReport
destination_dir: coverage
enable_jekyll: true
- name: Package
if: github.event_name == 'push'
run: |
make nuget
- uses: actions/upload-artifact@master
if: github.event_name == 'push'
with:
name: Packages
path: PackagesOut