Skip to content

Commit 5f397e4

Browse files
committed
Upgrade to .NET 6
And other packages. Rename trunk to suit zeitgeist. Remove NuGet publishing from CI.
1 parent 11c5b2e commit 5f397e4

File tree

8 files changed

+100
-80
lines changed

8 files changed

+100
-80
lines changed

.config/dotnet-tools.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"isRoot": true,
44
"tools": {
55
"gitversion.tool": {
6-
"version": "5.3.5",
6+
"version": "5.6.10",
77
"commands": [
88
"dotnet-gitversion"
99
]

.github/workflows/CI.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
env:
4+
CONFIGURATION: Release
5+
6+
on:
7+
push:
8+
branches: [ main ]
9+
pull_request:
10+
branches: [ main ]
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v1
20+
with:
21+
dotnet-version: 6.0.x
22+
include-prerelease: true
23+
24+
- name: Install dependencies
25+
run: dotnet restore
26+
27+
- name: Build
28+
run: dotnet build --no-restore --configuration $Env:CONFIGURATION
29+
30+
- name: Test
31+
run: dotnet test --no-build --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
32+
33+
- name: Upload coverage to Codecov
34+
uses: codecov/[email protected]

.github/workflows/Release.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Release
2+
3+
env:
4+
CONFIGURATION: Release
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: windows-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Install tools
19+
run: dotnet tool restore
20+
21+
# gitversion calculates assembly version based on tag (etc)
22+
# adds properties to project file
23+
# also adds environment variables
24+
- name: GitVersion
25+
run: dotnet dotnet-gitversion /output buildserver /updateprojectfiles
26+
27+
- name: Setup .NET 6
28+
uses: actions/setup-dotnet@v1
29+
with:
30+
dotnet-version: 6.0.x
31+
include-prerelease: true
32+
33+
- name: Install dependencies
34+
run: dotnet restore
35+
36+
# ContinuousIntegrationBuild obfuscates source file paths
37+
- name: Build
38+
run: dotnet build --no-restore --configuration $Env:CONFIGURATION /p:ContinuousIntegrationBuild=true
39+
40+
- name: Test
41+
run: dotnet test --no-build --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
42+
43+
- name: Pack
44+
run: dotnet pack --no-build -p:PackageVersion=$Env:GitVersion_NuGetVersionV2
45+
46+
- name: Publish
47+
env:
48+
NugetKey: ${{ secrets.NuGetKey }}
49+
run: dotnet nuget push (Get-ChildItem *.nupkg -Recurse) --api-key $Env:NuGetKey --source https://api.nuget.org/v3/index.json

.github/workflows/dotnet-core.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

GraphEngine.Tests/GraphEngine.Tests.csproj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="dotNetRDF" Version="2.5.1" />
11-
<PackageReference Include="ExpressionTreeToolkit.Core" Version="0.2.0" />
10+
<PackageReference Include="dotNetRDF" Version="2.7.1" />
11+
<PackageReference Include="ExpressionTreeToolkit.Core" Version="0.3.0" />
1212
<PackageReference Include="FluentAssertions" Version="5.10.3" />
13-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
13+
<PackageReference Include="coverlet.collector" Version="3.0.3">
1414
<PrivateAssets>all</PrivateAssets>
1515
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1616
</PackageReference>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
18-
<PackageReference Include="MSTest.TestAdapter" Version="2.1.1" />
19-
<PackageReference Include="MSTest.TestFramework" Version="2.1.1" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
18+
<PackageReference Include="MSTest.TestAdapter" Version="2.2.5-preview-20210605-01" />
19+
<PackageReference Include="MSTest.TestFramework" Version="2.2.4" />
2020
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
2121
<PrivateAssets>all</PrivateAssets>
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

GraphEngine.sln

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.29509.3
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31423.177
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphEngine.Tests", "GraphEngine.Tests\GraphEngine.Tests.csproj", "{5CF037D7-1711-4E3F-8213-73FCE6CE0F8C}"
77
EndProject
88
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GraphEngine", "GraphEngine\GraphEngine.csproj", "{6DCA8534-026F-4A05-9422-46DF9A2C69A5}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{95B632D7-6E0F-4F80-8F59-8443861DC3EA}"
1111
ProjectSection(SolutionItems) = preProject
12-
.github\workflows\dotnet-core.yml = .github\workflows\dotnet-core.yml
13-
.config\dotnet-tools.json = .config\dotnet-tools.json
12+
.github\workflows\CI.yml = .github\workflows\CI.yml
1413
IDEAS = IDEAS
1514
README.md = README.md
15+
.github\workflows\Release.yml = .github\workflows\Release.yml
1616
EndProjectSection
1717
EndProject
1818
Global

GraphEngine/GraphEngine.csproj

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
5-
<LangVersion>8.0</LangVersion>
4+
<TargetFramework>net6.0</TargetFramework>
65
<Nullable>enable</Nullable>
76
<PackageId>ExpressionRDF</PackageId>
87
<Authors>Samu Lang</Authors>
@@ -15,6 +14,7 @@
1514
<IncludeSymbols>true</IncludeSymbols>
1615
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
1716
<PublishRepositoryUrl>true</PublishRepositoryUrl>
17+
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
1818
</PropertyGroup>
1919

2020
<ItemGroup>
@@ -30,11 +30,7 @@
3030
</ItemGroup>
3131

3232
<ItemGroup>
33-
<PackageReference Include="dotNetRDF" Version="2.5.1" />
34-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.0.0">
35-
<PrivateAssets>all</PrivateAssets>
36-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
37-
</PackageReference>
33+
<PackageReference Include="dotNetRDF" Version="2.7.1" />
3834
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
3935
<PrivateAssets>all</PrivateAssets>
4036
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
[![Build](https://github.com/langsamu/GraphEngine/workflows/Test/badge.svg)](https://github.com/langsamu/GraphEngine/actions?query=workflow%3ATest)
2-
[![Codecov](https://codecov.io/gh/langsamu/GraphEngine/branch/master/graph/badge.svg)](https://codecov.io/gh/langsamu/GraphEngine)
1+
[![Build](https://github.com/langsamu/GraphEngine/workflows/CI/badge.svg)](https://github.com/langsamu/GraphEngine/actions?query=workflow%3ACI)
2+
[![Codecov](https://codecov.io/gh/langsamu/GraphEngine/branch/main/graph/badge.svg)](https://codecov.io/gh/langsamu/GraphEngine)

0 commit comments

Comments
 (0)