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

ci: add CI pipeline #21

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

Gh0stWalk3r
Copy link
Member

@Gh0stWalk3r Gh0stWalk3r commented Dec 2, 2023

resolves #2 (first part)
This PR adds CI support for code coverage and mutation testing.

In addition to the requirements, it adds reporting of the code coverage and mutation testing to the PR and the GitHub-Action summary as Markdown. Another difference is that the job Collect Code Coverage does not restore .NET local tools and instead performs a restore of the NuGet packages. Coverlet is installed as a project reference and not as a tool therefore the normal NuGet package restore is sufficient.

Add CI pipeline
Add code coverage
Add stryker
@Flash0ver Flash0ver added changelog:none No consumer observable changes (no SemVer increment) scope:repo GitHub repository type:ci Changes to our CI configuration files and scripts labels Dec 18, 2023
@Flash0ver Flash0ver changed the title Add CI pipeline ci: add CI pipeline Dec 18, 2023
Comment on lines +1 to +2
# Created by https://www.toptal.com/developers/gitignore/api/git,linux,macos,csharp,fsharp,windows,aspnetcore,dotnetcore,jetbrains+all,visualstudiocode
# Edit at https://www.toptal.com/developers/gitignore?templates=git,linux,macos,csharp,fsharp,windows,aspnetcore,dotnetcore,jetbrains+all,visualstudiocode
Copy link
Member

@Flash0ver Flash0ver Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually use the latest .gitignore from the .NET SDK.
Does this .gitignore provide something that the .NET SDK's .gitignore is missing?
Or is it alright - from your perspective - to keep the current version?

@@ -0,0 +1,8 @@
stryker-config:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it viable to move the stryker-config.yaml from source/gen/ to source/?
My argument is that this file is not directly consumed by the FlashOWare.Generators.csproj, but rather brining it, the tests and the solution together.
I guess we would need to update the .sln and the .yml as well.

What do you think?

EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlashOWare.Generated.Tests", "tests\FlashOWare.Generated.Tests\FlashOWare.Generated.Tests.csproj", "{422D58CF-5DD4-408E-8D35-48C187311FE5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlashOWare.Generators.Tests", "tests\FlashOWare.Generators.Tests\FlashOWare.Generators.Tests.csproj", "{998580C9-1518-43A8-A91B-B4C3D6B25B18}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_solution items", "_solution items", "{04634A03-F288-4A1B-9F81-258F23537516}"
Copy link
Member

@Flash0ver Flash0ver Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My final pet peeve 😉:
Would you mind renaming this solution folder from _solution items to _SolutionItems?
So that it still shows up on the top, but has a more ".NET-ty" name.

EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlashOWare.Generated.Tests", "tests\FlashOWare.Generated.Tests\FlashOWare.Generated.Tests.csproj", "{422D58CF-5DD4-408E-8D35-48C187311FE5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FlashOWare.Generators.Tests", "tests\FlashOWare.Generators.Tests\FlashOWare.Generators.Tests.csproj", "{998580C9-1518-43A8-A91B-B4C3D6B25B18}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_solution items", "_solution items", "{04634A03-F288-4A1B-9F81-258F23537516}"
Copy link
Member

@Flash0ver Flash0ver Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For completeness, please add 3 additional sub-solution-folders (to be on the same level as .github)

  • .config
  • docs
  • resources

and include the contained files as well.

Copy link
Member

@Flash0ver Flash0ver Feb 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current main has enabled Artifacts output layout:

   <PropertyGroup>
+    <UseArtifactsOutput>true</UseArtifactsOutput>
-    <!--<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>-->
+    <ArtifactsPath>$(MSBuildThisFileDirectory)../artifacts</ArtifactsPath>
  </PropertyGroup>

Could this cause problems with the CI-workflow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:none No consumer observable changes (no SemVer increment) scope:repo GitHub repository type:ci Changes to our CI configuration files and scripts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Initial CI/CD
2 participants