Skip to content

Updated TargetFrameworks, again #201

Updated TargetFrameworks, again

Updated TargetFrameworks, again #201

Workflow file for this run

name: .NET Core
on: [push, pull_request]
jobs:
build:
name: Build and test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
framework: ['netcoreapp3.1', 'net50', 'net60']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .Net 3.1
uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x' # SDK Version to use.
- name: Setup .Net 5.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x' # SDK Version to use.
- name: Setup .Net 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x' # SDK Version to use.
- name: Dotnet info
run: |
dotnet --version
dotnet --info
- name: Clear nuget cache
run: |
dotnet clean
dotnet nuget locals all --clear
- name: Dotnet restore
run: |
dotnet restore
- name: Build and Run unit tests
run: |
dotnet test --no-restore --configuration Release --verbosity normal --framework=${{ matrix.framework }} --logger trx --results-directory "TestResults-${{ matrix.os }}-${{ matrix.framework }}"
- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: dotnet-results-${{ matrix.os }}-${{ matrix.framework }}
path: TestResults-${{ matrix.os }}-${{ matrix.framework }}
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
#- name: Publish nupkg
# uses: actions/upload-artifact@v2
# with:
# name: CSRakowski.AsyncStreamsPreparations-nupkg
# path: |
# bin/Release/CSRakowski.AsyncStreamsPreparations.*.nupkg