Skip to content

Add missing XML documentation comments (#12) #20

Add missing XML documentation comments (#12)

Add missing XML documentation comments (#12) #20

Workflow file for this run

name: .NET Core
on:
push:
branches:
- develop
- beta
tags:
- v*
pull_request:
branches:
- develop
- beta
workflow_dispatch:
jobs:
build:
name: πŸ”¨ Build and Test
runs-on: ubuntu-latest
steps:
- name: πŸ‘¨β€πŸ’» Check-out code
uses: actions/checkout@v4
- name: πŸ‘¨β€πŸ”§ Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: πŸ” Enable problem matchers
run: echo "::add-matcher::.github/matchers/dotnet.json"
# - name: Install DocFX
# if: github.ref == 'refs/heads/develop'
# run: choco install docfx -y
- name: πŸ”¨ Build
run: |
dotnet build src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj --configuration Release
dotnet build tests/Titanium.Web.Proxy.UnitTests/Titanium.Web.Proxy.UnitTests.csproj --configuration Release
dotnet build tests/Titanium.Web.Proxy.IntegrationTests/Titanium.Web.Proxy.IntegrationTests.csproj --property WarningLevel=0
- name: πŸ§ͺ Test
shell: pwsh
run: |
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '## πŸ§ͺ Unit Tests'
dotnet test tests/Titanium.Web.Proxy.UnitTests/Titanium.Web.Proxy.UnitTests.csproj --configuration Release -v minimal --no-build --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/coverage.json;CoverletOutput=${{github.workspace}}/coverage' -- RunConfiguration.CollectSourceInformation=true
dotnet test tests/Titanium.Web.Proxy.IntegrationTests/Titanium.Web.Proxy.IntegrationTests.csproj -v minimal --no-build --logger GitHubActions '/p:CollectCoverage=true;CoverletOutputFormat="json,lcov,cobertura";MergeWith=${{github.workspace}}/coverage.json;CoverletOutput=${{github.workspace}}/coverage' -- RunConfiguration.CollectSourceInformation=true
- name: πŸ“ Code Coverage report
if: always()
shell: pwsh
run: |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.*
reportgenerator -reports:${{github.workspace}}/coverage.cobertura.xml -targetdir:${{github.workspace}}/report -reporttypes:MarkdownSummaryGithub -filefilters:-*.g.cs "-classfilters:-Titanium.Web.Proxy.Network.WinAuth.*" -verbosity:Warning
$report = Get-Content ${{github.workspace}}/report/SummaryGithub.md -Raw
$report = $report.Replace('# Summary', '## πŸ“ Code Coverage').Replace('## Coverage', '### πŸ“ Code Coverage details')
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value $report
env:
REPORTGENERATOR_LICENSE: ${{ secrets.REPORTGENERATOR_LICENSE }}
- name: πŸ“¦ Upload Code Coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: ${{github.workspace}}\report
if-no-files-found: ignore
retention-days: 5
# - name: Update Documentation
# if: github.ref == 'refs/heads/develop'
# run: docfx .github/docfx.json
# - name: Publish Documentation
# if: github.ref == 'refs/heads/develop'
# uses: EndBug/add-and-commit@v9
# with:
# default_author: github_actions
# message: Update documentation
# committer_name: GitHub Actions
# committer_email: [email protected]
publish:
name: πŸš€ Publish
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: πŸ‘¨β€πŸ’» Check-out code
uses: actions/checkout@v4
- name: πŸ‘¨β€πŸ”§ Setup .NET Core SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: πŸ” Enable problem matchers
run: echo "::add-matcher::.github/matchers/dotnet.json"
- name: πŸ“¦ Package
shell: pwsh
run: |
dotnet pack src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj --configuration Release -p:Version=$("${{ github.ref_name }}".Substring(1))
- name: πŸš€ Publish
run: |
dotnet nuget push **\*.nupkg -s "nuget" -k $NUGET_AUTH_TOKEN
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_TOKEN }}
- name: πŸ“ Publish summary
shell: pwsh
run: |
$version = $("${{ github.ref_name }}".Substring(1));
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value '## πŸš€ Published'
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "- Code [tag ${{ github.ref_name }}](https://github.com/svrooij/titanium-web-proxy/tree/${{ github.ref_name }}) has been published to NuGet."
Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "- Nuget [$version](https://www.nuget.org/packages/Unobtanium.Web.Proxy/$version) has been published to NuGet."