File tree Expand file tree Collapse file tree 3 files changed +38
-4
lines changed
BitFaster.Caching.UnitTests Expand file tree Collapse file tree 3 files changed +38
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Build and Test
2
2
3
3
on :
4
- push :
5
- branches : [ main ]
6
4
pull_request :
7
5
branches : [ main ]
8
6
23
21
run : dotnet build --configuration Release --no-restore
24
22
- name : Test
25
23
run : dotnet test --no-restore --verbosity normal
26
- - name : Publish NuGet package
24
+ - name : Publish NuGet artifacts
27
25
uses : actions/upload-artifact@v1
28
26
with :
29
27
name : NuGet package
Original file line number Diff line number Diff line change
1
+ name : Build, Test and Package
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+
7
+ jobs :
8
+ build :
9
+
10
+ runs-on : windows-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v2
14
+ - name : Setup .NET Core
15
+ uses : actions/setup-dotnet@v1
16
+ with :
17
+ dotnet-version : 6.0.x
18
+ - name : Install dependencies
19
+ run : dotnet restore
20
+ - name : Build
21
+ run : dotnet build --configuration Release --no-restore
22
+ - name : Test
23
+ run : dotnet test --no-restore --verbosity normal /p:CollectCoverage=true /p:CoverletOutput=TestResults/ /p:CoverletOutputFormat=lcov
24
+ - name : Publish NuGet artifacts
25
+ uses : actions/upload-artifact@v1
26
+ with :
27
+ name : NuGet package
28
+ path : BitFaster.Caching/bin/Release/
29
+ - name : Publish coverage report to coveralls.io
30
+ uses : coverallsapp/github-action@master
31
+ with :
32
+ github-token : ${{ secrets.GITHUB_TOKEN }}
33
+ path-to-lcov : BitFaster.Caching.UnitTests/TestResults/coverage.info
Original file line number Diff line number Diff line change 5
5
</PropertyGroup >
6
6
7
7
<ItemGroup >
8
+ <PackageReference Include =" coverlet.msbuild" Version =" 3.1.0" >
9
+ <PrivateAssets >all</PrivateAssets >
10
+ <IncludeAssets >runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets >
11
+ </PackageReference >
8
12
<PackageReference Include =" FluentAssertions" Version =" 5.10.3" />
9
13
<PackageReference Include =" Microsoft.NET.Test.Sdk" Version =" 16.5.0" />
10
14
<PackageReference Include =" xunit" Version =" 2.4.0" />
11
15
<PackageReference Include =" xunit.runner.visualstudio" Version =" 2.4.0" />
12
- <PackageReference Include =" coverlet.collector" Version =" 1.2.0" />
13
16
</ItemGroup >
14
17
15
18
<ItemGroup >
You can’t perform that action at this time.
0 commit comments