Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include additional test coverage #10

Merged
merged 13 commits into from
Nov 24, 2024
Merged
31 changes: 15 additions & 16 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,15 @@ jobs:
- name: Restore Dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Pack NuGet Packages
# run: dotnet pack --configuration Release --no-build --output ./packages --version 0.0.1-dev.$GITHUB_RUN_ID
run: dotnet pack --configuration Release --no-build --output ./packages /p:Version=0.0.1-dev

- name: Upload NuGet Packages
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./packages

- name: Test And Collect CodeCov
run: dotnet test ./tests/MockMe.Tests.slnf --no-build -c Release --verbosity normal /p:CollectCoverage=true /p:CoverletOutputFormat=lcov

run: |
dotnet tool install --global dotnet-coverage
dotnet-coverage collect "dotnet test --no-restore -c Release" -f xml

- name: Generate report
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.11
with:
reports: './tests/**/*.info'
reports: './output.xml'
targetdir: './tests/TestResults'
reporttypes: 'lcov'
filefilters: '-*\*.g.cs'
Expand All @@ -50,6 +39,16 @@ jobs:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
path-to-lcov: ./tests/TestResults/lcov.info

- name: Pack NuGet Packages
# run: dotnet pack --configuration Release --no-build --output ./packages --version 0.0.1-dev.$GITHUB_RUN_ID
run: dotnet pack --configuration Release --no-build --output ./packages /p:Version=0.0.1-dev

- name: Upload NuGet Packages
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./packages

test_linux:
runs-on: ubuntu-latest
strategy:
Expand Down
174 changes: 0 additions & 174 deletions src/MockMe.PostBuild/ILReplacer.cs

This file was deleted.

4 changes: 4 additions & 0 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,9 @@
CA1822; <!-- Mark members as static -->
$(WarningsNotAsErrors)
</WarningsNotAsErrors>

<!-- These props recommended in codeCoverage readMe https://github.com/microsoft/codecoverage?tab=readme-ov-file -->
<EnableStaticNativeInstrumentation>False</EnableStaticNativeInstrumentation>
<EnableDynamicNativeInstrumentation>False</EnableDynamicNativeInstrumentation>
</PropertyGroup>
</Project>
Loading