Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Update .NET versions and reduce test matrix cardinality #416

Merged
merged 31 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
c7af53b
matrix strategy
marcin-krystianc Jan 21, 2025
0459331
multiple frameworks
marcin-krystianc Jan 21, 2025
13ca5b9
multiple frameworks
marcin-krystianc Jan 21, 2025
8ffd4c3
two frameworks
marcin-krystianc Jan 21, 2025
8291fb4
extra property?
marcin-krystianc Jan 21, 2025
b8460b2
try different approach
marcin-krystianc Jan 21, 2025
c62a0ca
v8 v9
marcin-krystianc Jan 21, 2025
ec16017
.NET sdk
marcin-krystianc Jan 21, 2025
292d448
install v8 always
marcin-krystianc Jan 21, 2025
a7d5933
v9
marcin-krystianc Jan 21, 2025
a6843b3
do include ?
marcin-krystianc Jan 21, 2025
b76a5ac
net461;net8.0;net9.0
marcin-krystianc Jan 21, 2025
1161935
7 8
marcin-krystianc Jan 21, 2025
77b1e8a
net8.0
marcin-krystianc Jan 21, 2025
d88142c
primary + extended ?
marcin-krystianc Jan 21, 2025
e7e9314
no include?
marcin-krystianc Jan 21, 2025
6a5ceae
include
marcin-krystianc Jan 21, 2025
03d71db
exclude
marcin-krystianc Jan 21, 2025
2392211
no wildcards
marcin-krystianc Jan 21, 2025
79bbc76
try partial macos
marcin-krystianc Jan 21, 2025
8383ee1
macos-13
marcin-krystianc Jan 21, 2025
29a382a
upgrade dotnet , reduce cardinality
marcin-krystianc Jan 21, 2025
01c2e3e
single include
marcin-krystianc Jan 21, 2025
da94cc2
NuGetAuditMode=direct
marcin-krystianc Jan 21, 2025
2295381
NETFRAMEWORK
marcin-krystianc Jan 21, 2025
74f8f53
further reducing cardinality
marcin-krystianc Jan 21, 2025
8cfa36c
macos-latest
marcin-krystianc Jan 21, 2025
ed161f6
macos-latest
marcin-krystianc Jan 21, 2025
139ee92
v9
marcin-krystianc Jan 21, 2025
5cc5723
Merge remote-tracking branch 'origin/dev-20250121-matrix_strategy' in…
marcin-krystianc Jan 21, 2025
af7d7ee
Merge branch 'master' into dev-20250121-matrix_strategy
marcin-krystianc Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,21 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-13] # macos-13 for x86_x64 arch
framework: [net6.0, net7.0, net8.0]
framework: [net8.0, net9.0]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK v6.0.x
if: matrix.framework == 'net6.0'
- name: Setup .NET SDK v8.0.x
if: matrix.framework == 'net8.0'
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup .NET SDK v7.0.x
if: matrix.framework == 'net7.0'
uses: actions/setup-dotnet@v4
dotnet-version: 8.0.x
- name: Setup .NET SDK v9.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
dotnet-version: 9.0.x
- name: Build
run: dotnet build Consul.AspNetCore.Test --configuration=Release --framework=${{ matrix.framework }}
- name: Run tests
Expand All @@ -59,24 +56,31 @@ jobs:
strategy:
matrix:
consul: [1.7.14, 1.8.19, 1.9.17, 1.10.12, 1.11.11, 1.12.9, 1.13.9, 1.14.11, 1.15.10, 1.16.6, 1.17.3, 1.18.2, 1.19.2, 1.20.0]
framework: [net461, net6.0, net7.0, net8.0]
os: [ubuntu-latest, windows-latest, macos-latest, macos-13] # macos-13 for x86_x64 arch
framework: [net461, net8.0] # Latest LTS
os: [ubuntu-latest, windows-latest, macos-latest]
include:

- framework: net9.0 # Latest stable release
consul: 1.20.0
os: ubuntu-latest

- os: macos-13 # macos-13 for x86_x64 arch
framework: net8.0
consul: 1.20.0

fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET SDK v6.0.x
if: matrix.framework == 'net6.0'
- name: Setup .NET SDK v8.0.x
if: matrix.framework == 'net8.0'
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Setup .NET SDK v7.0.x
if: matrix.framework == 'net7.0'
uses: actions/setup-dotnet@v4
dotnet-version: 8.0.x
- name: Setup .NET SDK v9.0.x
with:
dotnet-version: 7.0.x
- name: Setup .NET SDK
dotnet-version: 9.0.x
uses: actions/setup-dotnet@v4
- name: Setup Consul Enterprise URL
# Consul enterprise until version 1.10.0 can be run even without a valid license,
Expand Down
2 changes: 1 addition & 1 deletion Consul.AspNetCore.Test/Consul.AspNetCore.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>

Expand Down
2 changes: 2 additions & 0 deletions Consul.Test/BaseFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,12 @@ static BaseFixture()
};
#endif

#if NETFRAMEWORK
// Some Consul object (e.g. semaphores) use multiple http connections,
// but on .NETFramework the default limit is sometimes very low (2) so we need to bump it to higher value.
// E.g. https://github.com/microsoft/referencesource/blob/5697c29004a34d80acdaf5742d7e699022c64ecd/System.Web/HttpRuntime.cs#L1200
ServicePointManager.DefaultConnectionLimit = int.MaxValue;
#endif

// As for HTTP connections, we need multiple threads to test semaphores and locks.
// XUnit sets the initial number of worker threads to the number of CPU cores.
Expand Down
2 changes: 1 addition & 1 deletion Consul.Test/Consul.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net461;net8.0;net9.0</TargetFrameworks>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<CopyLocalLockFileAssemblies Condition="'$(TargetFramework)' == 'netcoreapp2.1'">true</CopyLocalLockFileAssemblies>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
<Copyright>Copyright 2020-$([System.DateTime]::Now.ToString('yyyy')) G-Research Limited</Copyright>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>CS1591</NoWarn>
<NuGetAuditMode>direct</NuGetAuditMode>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.100",
"version": "9.0.100",
"rollForward": "latestMinor"
}
}
Loading