Performance improvements to CoberturaParser #515
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI-CD | |
on: [push, pull_request] | |
env: | |
solution: 'src\ReportGenerator.sln' | |
buildPlatform: Any CPU | |
buildConfiguration: Release | |
version: 5.3.8 | |
dotnetSDKVersion: 8.0.400 | |
nodeVersion: 20 | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Install npm' | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '${{ env.nodeVersion }}' | |
- name: setup-msbuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: 'Install dependendies' | |
run: msbuild .\build.proj /t:Restore | |
working-directory: src | |
- name: 'Setup .NET Core' | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: ${{ env.dotnetSDKVersion }} | |
- name: 'Show dotnet info' | |
run: dotnet --info | |
- name: 'Show dotnet version' | |
run: dotnet --version | |
- name: 'Use NuGet 6.x' | |
uses: nuget/setup-nuget@v2 | |
- name: 'NuGet Restore' | |
run: nuget restore ${{ env.solution }} | |
- name: 'Compile Solution' | |
run: msbuild '${{ env.solution }}' /p:configuration='${{ env.buildConfiguration }}' /p:platform='${{ env.buildPlatform }}' | |
- name: dotnet publish Console.NetCore 6.0 | |
run: dotnet publish -c ${{ env.BuildConfiguration }} -f net6.0 ReportGenerator.Console.NetCore.csproj | |
working-directory: src/ReportGenerator.Console.NetCore | |
- name: dotnet publish Console.NetCore 7.0 | |
run: dotnet publish -c ${{ env.BuildConfiguration }} -f net7.0 ReportGenerator.Console.NetCore.csproj | |
working-directory: src/ReportGenerator.Console.NetCore | |
- name: dotnet publish Console.NetCore 8.0 | |
run: dotnet publish -c ${{ env.BuildConfiguration }} -f net8.0 ReportGenerator.Console.NetCore.csproj | |
working-directory: src/ReportGenerator.Console.NetCore | |
- name: dotnet publish DotnetGlobalTool 6.0 | |
run: dotnet publish -c ${{ env.BuildConfiguration }} -f net6.0 ReportGenerator.DotnetGlobalTool.csproj | |
working-directory: src/ReportGenerator.DotnetGlobalTool | |
- name: dotnet publish DotnetGlobalTool 7.0 | |
run: dotnet publish -c ${{ env.BuildConfiguration }} -f net7.0 ReportGenerator.DotnetGlobalTool.csproj | |
working-directory: src/ReportGenerator.DotnetGlobalTool | |
- name: dotnet publish DotnetGlobalTool 8.0 | |
run: dotnet publish -c ${{ env.BuildConfiguration }} -f net8.0 ReportGenerator.DotnetGlobalTool.csproj | |
working-directory: src/ReportGenerator.DotnetGlobalTool | |
- name: Test | |
run: dotnet test src\ReportGenerator.Core.Test\ReportGenerator.Core.Test.csproj --configuration ${{ env.BuildConfiguration }} --no-build /p:CollectCoverage=true /p:DeterministicSourcePaths=true /p:IncludeTestAssembly=true /p:CoverletOutputFormat=opencover%2ccobertura /p:CoverletOutput=../target/reports/coverage/ | |
- name: ReportGenerator | |
uses: danielpalme/ReportGenerator-GitHub-Action@v5 | |
with: | |
reports: 'src\target\reports\coverage\coverage.opencover.xml' | |
targetdir: 'src\target\reports\coverage' | |
reporttypes: 'HtmlInline_AzurePipelines;Cobertura;Badges;MarkdownSummaryGithub' | |
assemblyfilters: '-xunit*' | |
license: '${{ secrets.REPORTGENERATOR_LICENSE }}' | |
- name: 'Publish coverage summary' | |
run: cat src/target/reports/coverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY | |
shell: bash | |
- name: 'Publish code coverage results' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CoverageReport | |
path: src/target/reports/coverage | |
- name: 'Prepare VSIX release: NetCore' | |
run: | | |
mkdir src/AzureDevopsTask/ReportGenerator/tools/net6.0 | |
xcopy 'src\ReportGenerator.Console.NetCore\bin\Release\net6.0\publish' 'src\AzureDevopsTask\ReportGenerator\tools\net6.0' /s | |
- name: 'Prepare VSIX release: Install TFS Cross Platform Command Line Interface (tfx-cli)' | |
run: npm install -g tfx-cli | |
- name: 'Prepare VSIX release: npm install' | |
run: npm install | |
working-directory: src/AzureDevopsTask/ReportGenerator | |
- name: 'Prepare VSIX release: Compile TypeScript' | |
run: npm run tsc -- | |
working-directory: src/AzureDevopsTask/ReportGenerator | |
- name: Create VSIX release | |
run: tfx extension create --manifest-globs vss-extension.json --output-path ../target/packages | |
working-directory: src/AzureDevopsTask | |
- name: 'Prepare ZIP release: mkdir' | |
run: | | |
mkdir tmpzip | |
mkdir tmpzip\net47 | |
mkdir tmpzip\net6.0 | |
mkdir tmpzip\net7.0 | |
mkdir tmpzip\net8.0 | |
- name: 'Prepare ZIP release' | |
run: | | |
xcopy "src\ReportGenerator.Console\bin\Release\Readme.txt" "tmpzip\" | |
xcopy "src\ReportGenerator.Console\bin\Release\LICENSE.txt" "tmpzip\" | |
xcopy "src\ReportGenerator.Console\bin\Release\appsettings.json" "tmpzip\net47\" | |
xcopy "src\ReportGenerator.Console\bin\Release\*.dll" "tmpzip\net47" | |
xcopy "src\ReportGenerator.Console\bin\Release\ReportGenerator.exe" "tmpzip\net47" | |
xcopy "src\ReportGenerator.Console\bin\Release\ReportGenerator.exe.config" "tmpzip\net47" | |
xcopy 'src\ReportGenerator.Console.NetCore\bin\Release\net6.0\publish\*' 'tmpzip\net6.0' /s | |
xcopy 'src\ReportGenerator.Console.NetCore\bin\Release\net7.0\publish\*' 'tmpzip\net7.0' /s | |
xcopy 'src\ReportGenerator.Console.NetCore\bin\Release\net8.0\publish\*' 'tmpzip\net8.0' /s | |
- name: 'Pack ZIP release' | |
run: Compress-Archive -Path tmpzip/* -DestinationPath src/target/packages/ReportGenerator_${{ env.Version }}.zip | |
- name: 'NuGet pack dotnet-reportgenerator-globaltool' | |
run: nuget pack src/Deployment/nuget/dotnet-reportgenerator-globaltool.nuspec -OutputDirectory src/target/packages -Version ${{ env.Version }} | |
- name: 'NuGet pack ReportGenerator.Core' | |
run: nuget pack src/Deployment/nuget/ReportGenerator.Core.nuspec -OutputDirectory src/target/packages -Version ${{ env.Version }} | |
- name: 'NuGet pack ReportGenerator' | |
run: nuget pack src/Deployment/nuget/ReportGenerator.nuspec -OutputDirectory src/target/packages -Version ${{ env.Version }} | |
- name: 'Chocolatey pack reportgenerator.portable' | |
run: .$env:USERPROFILE\.nuget\packages\chocolatey\2.2.2\tools\chocolateyInstall\choco.exe pack src/Deployment/chocolatey/reportgenerator.portable.nuspec --outputdirectory=src/target/packages --version=${{ env.Version }} | |
- name: 'Publish Artifact: packages' | |
uses: actions/upload-artifact@v4 | |
with: | |
path: src/target/packages | |
name: packages | |
publish: | |
needs: build | |
runs-on: windows-latest | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && startsWith(github.event.commits[0].message, 'Release ') }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Install npm' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '${{ env.nodeVersion }}' | |
- name: setup-msbuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: 'Install dependendies' | |
run: msbuild .\build.proj /t:Restore | |
working-directory: src | |
- name: 'Use NuGet 6.x' | |
uses: nuget/setup-nuget@v2 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: packages | |
- name: GitHubRelease | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ReportGenerator_${{ env.Version }} | |
body: This release requires .NET Framework 4.7 or .NET 6.0/7.0/8.0 | |
tag_name: v${{ env.Version }} | |
files: ReportGenerator_${{ env.Version }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
continue-on-error: true | |
- name: 'Prepare FTP Upload' | |
run: | | |
mkdir ftp | |
copy "ReportGenerator_${{ env.Version }}.zip" "ftp\ReportGenerator_${{ env.Version }}.zip" | |
# - name: 'FTP Upload: ZIP Release' | |
# uses: SamKirkland/[email protected] | |
# with: | |
# server: ${{ secrets.FTP_HOST }} | |
# username: ${{ secrets.FTP_USER }} | |
# password: ${{ secrets.FTP_PASSWORD }} | |
# local-dir: ftp/ | |
# server-dir: ${{ secrets.FTP_DIRECTORY }} | |
# protocol: ftps | |
# dangerous-clean-slate: true | |
# continue-on-error: true | |
- name: 'NuGet push dotnet-reportgenerator-globaltool' | |
run: nuget push dotnet-reportgenerator-globaltool.${{ env.Version }}.nupkg -ApiKey ${{ secrets.NUGETAPIKEY }} -Source https://www.nuget.org/api/v2/package | |
continue-on-error: true | |
- name: 'NuGet push ReportGenerator.Core' | |
run: nuget push ReportGenerator.Core.${{ env.Version }}.nupkg -ApiKey ${{ secrets.NUGETAPIKEY }} -Source https://www.nuget.org/api/v2/package | |
continue-on-error: true | |
- name: 'NuGet push ReportGenerator' | |
run: nuget push ReportGenerator.${{ env.Version }}.nupkg -ApiKey ${{ secrets.NUGETAPIKEY }} -Source https://www.nuget.org/api/v2/package | |
continue-on-error: true | |
- name: 'Chocolatey push reportgenerator.portable' | |
run: .$env:USERPROFILE\.nuget\packages\chocolatey\2.2.2\tools\chocolateyInstall\choco.exe push reportgenerator.portable.${{ env.Version }}.nupkg --apikey ${{ secrets.CHOCOLATEYAPIKEY }} --source https://push.chocolatey.org/ | |
continue-on-error: true | |
- name: 'Prepare VSIX release: Install TFS Cross Platform Command Line Interface (tfx-cli)' | |
run: npm install -g tfx-cli | |
continue-on-error: true | |
- name: Publish VSIX release | |
run: tfx extension publish --vsix Palmmedia.reportgenerator-${{ env.Version }}.vsix -t ${{ secrets.VISUALSTUDIOMARKETPLACETOKEN }} | |
continue-on-error: true |