Skip to content

Support .NET 8, bump System.Text.Json from 6.0.0 to non-vulnerable 8.0.5 #568

Support .NET 8, bump System.Text.Json from 6.0.0 to non-vulnerable 8.0.5

Support .NET 8, bump System.Text.Json from 6.0.0 to non-vulnerable 8.0.5 #568

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags: [ 'v[0-9]+.[0-9]+.[0-9]+*' ]
pull_request:
branches:
- master
permissions:
contents: read
jobs:
lint-and-approval-tests:
name: Lint & Approval Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core 8.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet restore ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln
- name: Check formatting
run: dotnet format --no-restore --verify-no-changes --severity warn ./Source/EasyNetQ.Management.Client.sln || (echo "Run 'dotnet format' to fix issues" && exit 1)
- name: Build
run: dotnet build ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln --configuration Release
- name: Approval Tests
run: |
cd ${{ github.workspace }}/Source/EasyNetQ.Management.Client.ApprovalTests
dotnet test --configuration Release --no-build
unit-tests:
name: Unit Tests
runs-on: ${{ matrix.os }}
needs: lint-and-approval-tests
timeout-minutes: 15
strategy:
max-parallel: 3
matrix:
include:
- os: ubuntu-latest
dotnet: 8.x
framework: net8.0
- os: windows-latest
dotnet: 4.8
framework: net48
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core 8.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet restore ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln
- name: Build
run: dotnet build ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln --configuration Release
- name: Tests
run: |
cd ${{ github.workspace }}/Source/EasyNetQ.Management.Client.Tests
dotnet test --configuration Release --framework ${{ matrix.framework }} --no-build
integration-tests:
name: Integrations Tests
runs-on: ${{ matrix.os }}
needs: lint-and-approval-tests
timeout-minutes: 15
strategy:
max-parallel: 6
matrix:
rabbitmq: ['3.12', '3.13', '4.0']
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
framework: net8.0
- os: windows-latest
framework: net48
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core 8.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet restore ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln
- name: Build
run: dotnet build ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln --configuration Release
- name: Integration Tests
env:
RABBITMQ_VERSION: ${{ matrix.rabbitmq }}
run: |
cd ${{ github.workspace }}/Source/EasyNetQ.Management.Client.IntegrationTests
dotnet test --configuration Release --framework ${{ matrix.framework }} --no-build
publish-to-nuget:
name: Publish to NuGet
runs-on: ubuntu-latest
needs: [lint-and-approval-tests, unit-tests, integration-tests]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core 8.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Install dependencies
run: dotnet restore ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln
- name: Build
run: dotnet build ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln --configuration Release
- name: Pack
run: dotnet pack ${{ github.workspace }}/Source/EasyNetQ.Management.Client.sln --configuration Release --no-build --include-symbols -p:PackageOutputPath="${{ github.workspace }}/Packages"
- name: Publish
run: dotnet nuget push '${{ github.workspace }}/Packages/*.*' --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_TOKEN }}