diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index 39d93531..e1e3c164 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -16,9 +16,6 @@ jobs:
steps:
- uses: actions/checkout@v3
- with:
- ref: ${{ github.head_ref }} # checkout the correct branch name
- fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
@@ -26,7 +23,11 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Build
- run: dotnet build --configuration Release --no-restore
+ run: dotnet build -c Release --no-restore
- name: Test
- run: dotnet test --configuration Release --no-build --verbosity normal --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=lcov
-
+ run: dotnet test -c Release --no-build
+ - name: Publish coverage report to coveralls.io
+ uses: coverallsapp/github-action@master
+ with:
+ github-token: ${{ secrets.GITHUB_TOKEN }}
+ path-to-lcov: src/TypealizR.SourceGenerators.Tests/coverage.info
diff --git a/.gitignore b/.gitignore
index dfcfd56f..ae9b0faf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -348,3 +348,4 @@ MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
+/src/TypealizR.SourceGenerators.Tests/coverage.info
diff --git a/README.md b/README.md
index 4615fd60..9fa86719 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
[![.NET](https://github.com/earloc/TypealizR/actions/workflows/dotnet.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/dotnet.yml)
+[![Coverage Status](https://coveralls.io/repos/github/earloc/TypealizR/badge.svg?branch=main)](https://coveralls.io/github/earloc/TypealizR?branch=main)
[![CodeQL](https://github.com/earloc/TypealizR/actions/workflows/codeql.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/codeql.yml)
[![Publish](https://github.com/earloc/TypealizR/actions/workflows/publish.yml/badge.svg)](https://github.com/earloc/TypealizR/actions/workflows/publish.yml)
[![NuGet](https://img.shields.io/nuget/v/TypealizR)](https://www.nuget.org/packages/TypealizR)
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index a1e1f554..0dd9cdf9 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,3 +1,3 @@
-
+
\ No newline at end of file
diff --git a/src/TypealizR.SourceGenerators.Tests/TypealizR.SourceGenerators.Tests.csproj b/src/TypealizR.SourceGenerators.Tests/TypealizR.SourceGenerators.Tests.csproj
index f76d0267..38918162 100644
--- a/src/TypealizR.SourceGenerators.Tests/TypealizR.SourceGenerators.Tests.csproj
+++ b/src/TypealizR.SourceGenerators.Tests/TypealizR.SourceGenerators.Tests.csproj
@@ -1,33 +1,39 @@
-
+
-
- net6.0
- enable
- enable
- false
-
+
+ net6.0
+ enable
+ enable
+ false
+
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
- runtime; build; native; contentfiles; analyzers; buildtransitive
- all
-
-
+
+ true
+ GeneratedCodeAttribute
+ lcov
+
-
-
-
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
diff --git a/src/TypealizR.SourceGenerators/TypealizR.SourceGenerators.csproj b/src/TypealizR.SourceGenerators/TypealizR.SourceGenerators.csproj
index 70566f5d..1d6d0ca4 100644
--- a/src/TypealizR.SourceGenerators/TypealizR.SourceGenerators.csproj
+++ b/src/TypealizR.SourceGenerators/TypealizR.SourceGenerators.csproj
@@ -3,7 +3,7 @@
netstandard2.0
enable
- 11
+ latest
@@ -36,7 +36,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive