Update dependabot.yml #398
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
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', 'net80'] | |
steps: | |
- name: Check out code onto host | |
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: Setup .Net 8.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.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 | |
continue-on-error: true | |
run: | | |
dotnet test --no-restore --configuration Release --verbosity normal --framework=${{ matrix.framework }} --logger trx --results-directory "TestResults-${{ matrix.os }}-${{ matrix.framework }}" | |
#Benchmarks: | |
- name: Run Benchmarks | |
run: | | |
dotnet run --no-restore --configuration Release --verbosity normal --framework=${{ matrix.framework }} --project ./tests/CSRakowski.Parallel.Benchmarks/ | |
if: matrix.framework == 'net80' | |
- 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: Upload BenchmarkDotNet results | |
uses: actions/upload-artifact@v3 | |
with: | |
name: BenchmarkDotNet-${{ matrix.os }}-${{ matrix.framework }} | |
path: BenchmarkDotNet.Artifacts | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} | |
build-netfx: | |
name: Build and test .NET Framework | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
framework: ['net45', 'net472', 'net48'] | |
steps: | |
- name: Check out code onto host | |
uses: actions/checkout@v4 | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Setup .Net 8.0 | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.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 | |
continue-on-error: true | |
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-windows-latest-${{ matrix.framework }} | |
path: TestResults-windows-latest-${{ matrix.framework }} | |
# Use always() to always run this step to publish test results when there are test failures | |
if: ${{ always() }} |