Codacy has free accounts that easily integrate with github repositories like this project. This integration can provide valuable metrics while reducing the complexity of integration with other metric generating tools.
- Using Github
- Check out current code
- Build solution
- Execute Tests and generate coverage results
- Format test results compliant with codacy needs
- Upload coverage report to Codacy
- Using Codacy
- Examine Results of Codacy evaluation
- Examine Results of Coverage Report
dotnet tools allow for most of these actions to be accomplished.
Step | github action command |
---|---|
Checkout code | actions/checkout |
Install dotnet tools | dotnet tool restore |
Restore solution | dotnet restore |
Build solution | dotnet build ... |
Run tests | dotnet test ... |
Install Report Generator | dotnet tool install ... |
Build Reports | reportgenerator ... |
Generate Report as Markdown | irongut/CodeCoverageSummary |
Add Report to PR Comment | marocchino/sticky-pull-request-comment |
Upload Report to Codacy | codacy/codacy-coverage-reporter-action |
Add Coverage Report to Job Summary | >> $GITHUB_STEP_SUMMARY |
Generate NuGet Package | dotnet pack ... |
Add Package to Artifacts | actions/upload-artifact |
Upload NuGet Package to Nuget.org | -in progress- |
Github Build Workflow - Build, Test, Package, and Report