Skip to content

Commit

Permalink
Extend the existing CI pipeline
Browse files Browse the repository at this point in the history
- Add .NET 5, 6, & 7
- Add Windows and macOS
- Update NuGet packages for tests
  • Loading branch information
eXpl0it3r committed Aug 7, 2023
1 parent 0665279 commit bb32e1e
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 24 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -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
19 changes: 0 additions & 19 deletions .github/workflows/dotnetcore.yml

This file was deleted.

13 changes: 8 additions & 5 deletions Sources/DotNetGraph.Tests/DotNetGraph.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>

<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NFluent" Version="2.6.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageReference Include="NFluent" Version="3.0.1.352" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit bb32e1e

Please sign in to comment.