Skip to content

Add a report comment to PRs #503

Add a report comment to PRs

Add a report comment to PRs #503

Workflow file for this run

# 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
on:
push:
paths-ignore:
- "StepLang.Wiki/**"
- "StepLang.Homepage/**"
branches: [ "main" ]
pull_request:
paths-ignore:
- "StepLang.Wiki/**"
- "StepLang.Homepage/**"
branches: [ "main" ]
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
version: [6.x, 7.x, 8.x]
runs-on: ${{ matrix.os }}
name: Build & Test on .NET ${{ matrix.version }} (${{ matrix.os }})
outputs:
badge: ${{ steps.coverage.outputs.badge }}
line_rate: ${{ steps.coverage.outputs.line_rate }}
branch_rate: ${{ steps.coverage.outputs.branch_rate }}
complexity: ${{ steps.coverage.outputs.complexity }}
health: ${{ steps.coverage.outputs.health }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.version }}
- name: Cache NuGet packages
uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build