Update dependency Serilog to v4 #103
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET Test | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Codecov | |
uses: codecov/codecov-action@v4 | |
- name: "Restore/Build/Test" | |
run: dotnet test --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" | |
- name: Combine Coverage Reports | |
uses: danielpalme/[email protected] | |
with: | |
reports: "**/*.cobertura.xml" | |
targetdir: "${{ github.workspace }}" | |
reporttypes: "Cobertura" | |
verbosity: "Info" | |
title: "Code Coverage" | |
tag: "${{ github.run_number }}_${{ github.run_id }}" | |
customSettings: "" | |
toolpath: "reportgeneratortool" | |
- name: Upload Combined Coverage XML | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage | |
path: ${{ github.workspace }}/Cobertura.xml | |
retention-days: 5 | |
- name: Publish Code Coverage Report | |
uses: irongut/[email protected] | |
with: | |
filename: "Cobertura.xml" | |
badge: true | |
fail_below_min: false # just informative for now | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: false | |
indicators: true | |
output: both | |
thresholds: "10 30" | |
- name: Add Coverage PR Comment | |
uses: marocchino/sticky-pull-request-comment@v2 | |
if: github.event_name == 'pull_request' | |
with: | |
recreate: true | |
path: code-coverage-results.md | |
- name: Upload Test Result Files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: ${{ github.workspace }}/**/TestResults/**/* | |
retention-days: 5 | |
- name: Publish Test Results | |
uses: EnricoMi/[email protected] | |
if: always() | |
with: | |
trx_files: "${{ github.workspace }}/**/*.trx" | |