Skip to content

Build and Test Core Lib #56

Build and Test Core Lib

Build and Test Core Lib #56

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: Build and Test Core Lib
on:
# Allow manually running the workflow
workflow_dispatch:
push:
branches:
- dev
paths-ignore:
- '**/*.gitignore'
- '**/*.gitattributes'
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- dev
paths-ignore:
- '**/*.gitignore'
- '**/*.gitattributes'
env:
PROJECTS: "./src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj"
TESTS: "./tests/Core/Microsoft.FluentUI.AspNetCore.Components.Tests.csproj"
jobs:
Build:
runs-on: windows-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build ${{ env.PROJECTS }} --configuration Release
working-directory: ${{ github.workspace }}
Test:
needs: Build
runs-on: windows-latest
steps:
- name: Test
run: dotnet test ${{ env.TESTS }} --verbosity normal --configuration Release /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:DebugType=Full
working-directory: ${{ github.workspace }}
- name: Publish Code Coverage Summary
uses: EnricoMi/publish-unit-test-result-action@v2
with:
filename: '**/coverage.opencover.xml'
badge: true
fail_below_min: true
format: markdown