Update Readme #14
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: build-and-test | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "develop", "master" ] | |
jobs: | |
build_and_test: | |
name: Build and Test .NET Libraries | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
dotnet-version: [8.0.x, 4.8] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup .NET 8 | |
if: matrix.dotnet-version == '8.0.x' | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dotnet-version }} | |
- name: Setup .NET Framework 4.8 | |
if: matrix.dotnet-version == '4.8' | |
run: echo "Using pre-installed .NET Framework 4.8" | |
- name: Restore dependencies .NET 8 | |
if: matrix.dotnet-version == '8.0.x' | |
run: dotnet restore | |
- name: Restore dependencies .NET 4.8 | |
if: matrix.dotnet-version == '4.8' | |
run: nuget restore ObjectFillerNET.sln | |
- name: Build .NET 8 | |
if: matrix.dotnet-version == '8.0.x' | |
run: dotnet build --configuration Release --no-restore | |
- name: Build .NET 4.8 | |
if: matrix.dotnet-version == '4.8' | |
run: | | |
&"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\bin\MSBuild.exe" ObjectFillerNET.sln /p:Configuration=Release | |
- name: Test .NET 8 | |
if: matrix.dotnet-version == '8.0.x' | |
run: dotnet test --configuration Release --no-build --verbosity normal | |
- name: Test .NET 4.8 | |
if: matrix.dotnet-version == '4.8' | |
run: | | |
&"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" Tynamix.ObjectFiller.Test\bin\Release\net48\Tynamix.ObjectFiller.Test.dll |