ci: Run tests sequential #2
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: .NET Core | |
on: | |
push: | |
branches: | |
- develop | |
- beta | |
- stable | |
- jump-cables-slow | |
pull_request: | |
branches: | |
- develop | |
- beta | |
- stable | |
workflow_dispatch: | |
jobs: | |
build: | |
name: π¨ Build and Test | |
runs-on: windows-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 --configuration Release | |
- name: Test | |
shell: pwsh | |
run: | | |
.\.github\install-unit-test-certificate.ps1 | |
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 --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 | |
- name: π Code Coverage report | |
run: | | |
dotnet tool install --global dotnet-reportgenerator-globaltool --version 5.3.4 | |
reportgenerator -reports:${{github.workspace}}/coverage.cobertura.xml -targetdir:${{github.workspace}}/report -reporttypes:MarkdownSummaryGithub -filefilters:-*.g.cs -verbosity:Warning | |
sed -i 's/# Summary/## π Code Coverage/g' ${{github.workspace}}/report/SummaryGithub.md | |
sed -i 's/## Coverage/### π Code Coverage details/g' ${{github.workspace}}/report/SummaryGithub.md | |
cat ${{github.workspace}}/report/*.md >> $GITHUB_STEP_SUMMARY | |
# - 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: actions@github.com | |
# - name: Publish Beta | |
# if: github.ref == 'refs/heads/beta' | |
# run: | | |
# dotnet pack src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj --version-suffix "beta" | |
# dotnet nuget push **\*.nupkg -s "nuget" -k "${{ secrets.NUGET_TOKEN }}" | |
# - name: Publish Stable | |
# if: github.ref == 'refs/heads/stable' | |
# run: | | |
# dotnet pack src/Titanium.Web.Proxy/Titanium.Web.Proxy.csproj | |
# dotnet nuget push **\*.nupkg -s "nuget" -k "${{ secrets.NUGET_TOKEN }}" |