Skip to content

Bump Microsoft.NET.Test.Sdk from 18.0.0 to 18.0.1 #296

Bump Microsoft.NET.Test.Sdk from 18.0.0 to 18.0.1

Bump Microsoft.NET.Test.Sdk from 18.0.0 to 18.0.1 #296

Workflow file for this run

name: test
on:
pull_request:
branches:
- main
paths:
- "**/*.cs"
- "**/*.csproj"
- "**/*.props"
- "**/packages.lock.json"
- ".config/dotnet-tools.json"
- "global.json"
- ".github/workflows/test.yml"
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v5
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
global-json-file: ./global.json
cache: true
cache-dependency-path: "**/packages.lock.json"
- name: Install Report Generator
run: dotnet tool restore
- name: Restore
run: dotnet restore --locked-mode
- name: Build
run: dotnet build -c Release --no-restore
- name: Test & collect coverage
run: |
dotnet test -c Release --no-restore --no-build \
--settings tests/coverage.runsettings --results-directory ${{ github.workspace }}/test-results
env:
USE_MOCK_SERVER: ${{ vars.USE_MOCK_SERVER }}
SHOW_MOCK_SERVER_LOGS: ${{ vars.SHOW_MOCK_SERVER_LOGS }}
TESTING_LOG_LEVEL: ${{ vars.TESTING_LOG_LEVEL }}
- name: Find coverage files and generate report
run: |
dotnet tool run reportgenerator -reports:"${{ github.workspace }}/test-results/**/*cobertura.xml" \
-targetdir:"coverage-report" \
-reporttypes:MarkdownSummaryGithub
- name: Upload coverage report
uses: actions/upload-artifact@v5
with:
name: coverage-report
path: coverage-report
- name: Add coverage to summary
run: cat coverage-report/SummaryGithub.md >> $GITHUB_STEP_SUMMARY