Skip to content

Commit

Permalink
Upgrade to .NET 6
Browse files Browse the repository at this point in the history
And other packages.
Rename trunk to suit zeitgeist.
Remove NuGet publishing from CI.
  • Loading branch information
langsamu committed Jun 27, 2021
1 parent 11c5b2e commit 5f397e4
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"gitversion.tool": {
"version": "5.3.5",
"version": "5.6.10",
"commands": [
"dotnet-gitversion"
]
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

env:
CONFIGURATION: Release

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
include-prerelease: true

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore --configuration $Env:CONFIGURATION

- name: Test
run: dotnet test --no-build --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover

- name: Upload coverage to Codecov
uses: codecov/[email protected]
49 changes: 49 additions & 0 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Release

env:
CONFIGURATION: Release

on:
release:
types: [created]

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install tools
run: dotnet tool restore

# gitversion calculates assembly version based on tag (etc)
# adds properties to project file
# also adds environment variables
- name: GitVersion
run: dotnet dotnet-gitversion /output buildserver /updateprojectfiles

- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
include-prerelease: true

- name: Install dependencies
run: dotnet restore

# ContinuousIntegrationBuild obfuscates source file paths
- name: Build
run: dotnet build --no-restore --configuration $Env:CONFIGURATION /p:ContinuousIntegrationBuild=true

- name: Test
run: dotnet test --no-build --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover

- name: Pack
run: dotnet pack --no-build -p:PackageVersion=$Env:GitVersion_NuGetVersionV2

- name: Publish
env:
NugetKey: ${{ secrets.NuGetKey }}
run: dotnet nuget push (Get-ChildItem *.nupkg -Recurse) --api-key $Env:NuGetKey --source https://api.nuget.org/v3/index.json
59 changes: 0 additions & 59 deletions .github/workflows/dotnet-core.yml

This file was deleted.

14 changes: 7 additions & 7 deletions GraphEngine.Tests/GraphEngine.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

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

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

<ItemGroup>
<PackageReference Include="dotNetRDF" Version="2.5.1" />
<PackageReference Include="ExpressionTreeToolkit.Core" Version="0.2.0" />
<PackageReference Include="dotNetRDF" Version="2.7.1" />
<PackageReference Include="ExpressionTreeToolkit.Core" Version="0.3.0" />
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
<PackageReference Include="coverlet.collector" Version="3.0.3">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5-preview-20210605-01" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.4" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
8 changes: 4 additions & 4 deletions GraphEngine.sln
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29509.3
# Visual Studio Version 17
VisualStudioVersion = 17.0.31423.177
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphEngine.Tests", "GraphEngine.Tests\GraphEngine.Tests.csproj", "{5CF037D7-1711-4E3F-8213-73FCE6CE0F8C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphEngine", "GraphEngine\GraphEngine.csproj", "{6DCA8534-026F-4A05-9422-46DF9A2C69A5}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{95B632D7-6E0F-4F80-8F59-8443861DC3EA}"
ProjectSection(SolutionItems) = preProject
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
.config\dotnet-tools.json = .config\dotnet-tools.json
.github\workflows\CI.yml = .github\workflows\CI.yml
IDEAS = IDEAS
README.md = README.md
.github\workflows\Release.yml = .github\workflows\Release.yml
EndProjectSection
EndProject
Global
Expand Down
10 changes: 3 additions & 7 deletions GraphEngine/GraphEngine.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>8.0</LangVersion>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<PackageId>ExpressionRDF</PackageId>
<Authors>Samu Lang</Authors>
Expand All @@ -15,6 +14,7 @@
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

<ItemGroup>
Expand All @@ -30,11 +30,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="dotNetRDF" Version="2.5.1" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="dotNetRDF" Version="2.7.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[![Build](https://github.com/langsamu/GraphEngine/workflows/Test/badge.svg)](https://github.com/langsamu/GraphEngine/actions?query=workflow%3ATest)
[![Codecov](https://codecov.io/gh/langsamu/GraphEngine/branch/master/graph/badge.svg)](https://codecov.io/gh/langsamu/GraphEngine)
[![Build](https://github.com/langsamu/GraphEngine/workflows/CI/badge.svg)](https://github.com/langsamu/GraphEngine/actions?query=workflow%3ACI)
[![Codecov](https://codecov.io/gh/langsamu/GraphEngine/branch/main/graph/badge.svg)](https://codecov.io/gh/langsamu/GraphEngine)

0 comments on commit 5f397e4

Please sign in to comment.