Skip to content

Bump danielpalme/ReportGenerator-GitHub-Action from 5.2.5 to 5.3.0 (#… #30

Bump danielpalme/ReportGenerator-GitHub-Action from 5.2.5 to 5.3.0 (#…

Bump danielpalme/ReportGenerator-GitHub-Action from 5.2.5 to 5.3.0 (#… #30

name: pr_validation
on:
push:
branches:
- master
- dev
- main
pull_request:
branches:
- master
- dev
- main
permissions:
checks: write
pull-requests: write
issues: write
contents: read
jobs:
test:
# Permissions this GitHub Action needs for other things in GitHub
name: Test-${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: "Checkout"
uses: actions/checkout@v4.1.5
with:
lfs: true
fetch-depth: 0
- name: "Install .NET SDK"
uses: actions/setup-dotnet@v4.0.0
with:
global-json-file: "./global.json"
- name: "Update release notes"
shell: pwsh
run: |
./build.ps1
- name: "dotnet build"
run: dotnet build -c Release
- name: "dotnet pack"
run: dotnet pack -c Release
- name: "dotnet test (Linux)"
if: runner.os == 'Linux'
run: dotnet test --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage"
- name: "dotnet test (Windows)"
if: runner.os == 'Windows'
run: dotnet test --configuration Release --verbosity normal --logger trx --collect:"XPlat Code Coverage" ./tests/TurboMqtt.Tests/TurboMqtt.Tests.csproj
- name: Combine Coverage Reports
if: runner.os == 'Linux'
uses: danielpalme/ReportGenerator-GitHub-Action@5.3.0
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: Publish Code Coverage Report
if: runner.os == 'Linux'
uses: irongut/CodeCoverageSummary@v1.3.0
with:
filename: "Cobertura.xml"
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: false
hide_complexity: false
indicators: true
output: both
thresholds: "10 30"
- name: Add Coverage PR Comment
if: github.event_name == 'pull_request_target' && runner.os == 'Linux'
uses: marocchino/sticky-pull-request-comment@v2
with:
recreate: true
path: code-coverage-results.md
- name: Upload Test Result Files
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: test-results
path: ${{ github.workspace }}/**/TestResults/**/*
retention-days: 5
- name: Publish Test Results
if: always() && runner.os == 'Linux'
uses: EnricoMi/publish-unit-test-result-action@v2.16.1
with:
trx_files: "${{ github.workspace }}/**/*.trx"