Skip to content

Commit

Permalink
change build pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Connor Ivy committed Dec 3, 2024
1 parent e0595f8 commit 252d3db
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 67,306 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/buildAndTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,20 @@ jobs:
- name: Restore Dependencies
run: dotnet restore

- name: Build src projects and test runner
run: |
dotnet build -c Debug ./src/MockMe/
dotnet build -c Debug ./tests/MockMe.Tests.Runner/
- name: Test And Collect CodeCov
run: |
dotnet tool install --global dotnet-coverage
dotnet-coverage collect "dotnet test --no-restore -c Release" -f xml
dotnet-coverage collect "dotnet run --project ./tests/MockMe.Tests.Runner/" -f cobertura -s ./CodeCoverage.runsettings
- name: Generate report
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.11
with:
reports: './output.xml'
reports: './output.cobertura.xml'
targetdir: './tests/TestResults'
reporttypes: 'lcov'
filefilters: '-*\*.g.cs'
Expand All @@ -41,7 +46,7 @@ jobs:

- 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
run: dotnet pack --configuration Release --output ./packages /p:Version=0.0.1-dev

- name: Upload NuGet Packages
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,5 @@ MigrationBackup/
openSees/lib

output.xml

output.cobertura.xml
10 changes: 5 additions & 5 deletions CodeCoverage.runsettings
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
<CodeCoverage>
<ModulePaths>
<Exclude>
<!--<ModulePath>.*MockMe.Tests.dll$</ModulePath>
<ModulePath>.*Tests.*</ModulePath>-->
<ModulePath>.MockMe.Tests.ExampleClasses.dll$</ModulePath>
<!--<ModulePath>.*Tests.*</ModulePath>-->
</Exclude>
</ModulePaths>
<Sources>
<Exclude>
<!--<Source>.*Polysharp.*</Source>
<Source>.*.g.cs$</Source>-->
<Source>.*Polysharp.*</Source>
<Source>.*.g.cs$</Source>
</Exclude>
</Sources>

<CollectFromChildProcesses>True</CollectFromChildProcesses>
<UseVerifiableInstrumentation>False</UseVerifiableInstrumentation>
<!--<UseVerifiableInstrumentation>False</UseVerifiableInstrumentation>-->
<!--<UseVerifiableInstrumentation>False</UseVerifiableInstrumentation>-->
<EnableStaticNativeInstrumentation>False</EnableStaticNativeInstrumentation>
<EnableDynamicNativeInstrumentation>False</EnableDynamicNativeInstrumentation>
Expand Down
4 changes: 0 additions & 4 deletions output.cobertura.xml

This file was deleted.

9 changes: 8 additions & 1 deletion tests/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>

<Target
Name="CopySourceGeneratorOutputs"
BeforeTargets="CoreCompile"
Condition="'$(IncludeMockMeRef)' == 'True' And '$(MockMeNugetPackageVersion)' == ''"
>
<Copy SourceFiles="..\..\src\MockMe.Generator\bin\$(Configuration)\netstandard2.0\MockMe.Generator.dll" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="..\..\src\MockMe.Generator\bin\$(Configuration)\netstandard2.0\MockMe.Generator.pdb" DestinationFolder="$(OutputPath)" />
</Target>
</Project>
Loading

0 comments on commit 252d3db

Please sign in to comment.