Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 27 additions & 2 deletions .github/workflows/dotnetcore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,30 @@ jobs:

- name: Build with dotnet
run: dotnet build src/MockQueryable/*.sln --configuration Release
- name: Test with dotnet
run: dotnet test src/MockQueryable/*.sln
- name: Test with coverage (coverlet)
run: |
mkdir -p TestResults

COVERAGE_DIR="$(pwd)/TestResults"

dotnet test src/MockQueryable/*.sln \
--configuration Release \
--no-build \
/p:CollectCoverage=true \
/p:CoverletOutput="$COVERAGE_DIR/coverage-" \
/p:CoverletOutputFormat=opencover

ls -R "$COVERAGE_DIR" || echo Empty folder
- name: Upload coverage results (artifact)
uses: actions/upload-artifact@v4
with:
name: code-coverage
path: TestResults

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: TestResults/**/*.opencover.xml
flags: unittests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Extensions for mocking [Entity Framework Core](https://github.com/dotnet/efcore)

## ✅ Build & Status

[![codecov](https://codecov.io/github/romantitov/MockQueryable/graph/badge.svg?token=dtiYMUNHUo)](https://codecov.io/github/romantitov/MockQueryable)
![.NET Core](https://github.com/romantitov/MockQueryable/workflows/.NET%20Core/badge.svg)
[![License](https://img.shields.io/github/license/romantitov/MockQueryable.svg)](https://github.com/romantitov/MockQueryable/blob/master/LICENSE)

Expand Down Expand Up @@ -138,3 +139,4 @@ See the [sample project](https://github.com/romantitov/MockQueryable/tree/master




Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<PackageReference Include="AutoMapper" Version="15.1.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageReference Include="coverlet.msbuild" Version="6.0.4" PrivateAssets="All" />
<!--<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.4" />-->
<PackageReference Include="NUnit" Version="4.4.0" />
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0">
Expand Down