diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..f5668e0 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,40 @@ +name: .NET + +on: [push, pull_request] + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + +jobs: + build: + name: ${{ matrix.platform.name }} ${{ matrix.dotnet.name }} + runs-on: ${{ matrix.platform.os }} + + strategy: + fail-fast: false + matrix: + platform: + - { name: Linux, os: ubuntu-22.04 } + - { name: Windows, os: windows-2022 } + - { name: macOS, os: macos-12 } + dotnet: + - { name: .NET Core 3.1, version: "3.1" } + - { name: .NET 5, version: "5.0.x" } + - { name: .NET 6, version: "6.0.x" } + - { name: .NET 7, version: "7.0.x" } + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET ${{ matrix.dotnet.version }} SDK + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet.version }} + - name: Enforce SDK Version + run: dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} --force + - name: Verify SDK Installation + run: dotnet --info + - name: Build + run: dotnet build ./Sources -c Release + - name: Test + if: matrix.dotnet.version == '6.0.x' + run: dotnet test ./Sources -v n --no-restore --no-build -c Release diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml deleted file mode 100644 index 2221986..0000000 --- a/.github/workflows/dotnetcore.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: .NET Core - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 3.1.100 - - name: Build - run: dotnet build ./Sources -c Release - - name: Test - run: dotnet test ./Sources -v n --no-restore --no-build -c Release diff --git a/Sources/DotNetGraph.Tests/DotNetGraph.Tests.csproj b/Sources/DotNetGraph.Tests/DotNetGraph.Tests.csproj index 8e238d1..db9c998 100644 --- a/Sources/DotNetGraph.Tests/DotNetGraph.Tests.csproj +++ b/Sources/DotNetGraph.Tests/DotNetGraph.Tests.csproj @@ -1,16 +1,19 @@ - netcoreapp3.1 + net6.0 false - - - - + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +