Skip to content

Commit 1c80fe8

Browse files
authored
chore: Switch to the SDK's included Central Package Management (#1106)
1 parent f4ee0b2 commit 1c80fe8

File tree

115 files changed

+501
-440
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+501
-440
lines changed

.github/workflows/cicd.yml

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,36 @@ jobs:
3535

3636
steps:
3737
- name: Checkout Repository
38-
uses: actions/checkout@v3
38+
uses: actions/checkout@v4
3939
with:
4040
lfs: true
4141

4242
- name: Cache NuGet Packages
43-
uses: actions/cache@v3
43+
uses: actions/cache@v4
4444
with:
45-
key: ${{ matrix.os }}-nuget-${{ hashFiles('Directory.Build.props') }}
45+
key: ${{ matrix.os }}-nuget-${{ hashFiles('Directory.Packages.props') }}
4646
path: ~/.nuget/packages
4747

48+
# Our modules occupy too much disk space. The GitHub-hosted runners ran into the
49+
# error: "no space left on device." The pulled images are not cleaned up between
50+
# the test runs. One obvious approach is splitting the tests and running them on
51+
# multiple runners. However, we need to keep in mind that running too many
52+
# simultaneous builds has an impact on others as well. We observed that scheduled
53+
# Dependabot builds blocked others in the Testcontainers organization.
4854
- name: Free Disk Space
49-
run: Remove-Item -Recurse -Force '/usr/local/lib/android' -ErrorAction SilentlyContinue # TODO: Split module tests across multiple runners (the Docker images require too much disk space)
50-
shell: pwsh
55+
uses: jlumbroso/[email protected]
56+
if: runner.os == 'Linux'
57+
with:
58+
tool-cache: true
59+
android: true
60+
dotnet: true
61+
haskell: true
62+
large-packages: true
63+
docker-images: true
64+
swap-storage: false
5165

5266
- name: Setup .NET
53-
uses: actions/setup-dotnet@v3
67+
uses: actions/setup-dotnet@v4
5468

5569
- name: Restore .NET Tools
5670
run: dotnet tool restore
@@ -65,7 +79,7 @@ jobs:
6579
run: dotnet cake --target=Tests --test-filter=${{ startsWith(matrix.os, 'ubuntu') && 'FullyQualifiedName~Testcontainers' || 'DockerPlatform=Windows' }}
6680

6781
- name: Upload Test And Coverage Results
68-
uses: actions/upload-artifact@v3
82+
uses: actions/upload-artifact@v4
6983
with:
7084
name: ${{ matrix.os }}
7185
path: test-results
@@ -77,7 +91,7 @@ jobs:
7791

7892
environment: production
7993

80-
runs-on: windows-2022 # It looks like the Linux runner cannot sign the NuGet using a PFX file.
94+
runs-on: ubuntu-22.04
8195

8296
permissions:
8397
contents: write
@@ -96,19 +110,19 @@ jobs:
96110

97111
steps:
98112
- name: Checkout Repository
99-
uses: actions/checkout@v3
113+
uses: actions/checkout@v4
100114
with:
101115
lfs: true
102116
fetch-depth: 0
103117

104118
- name: Download Test And Coverage Results (ubuntu-22.04)
105-
uses: actions/download-artifact@v3
119+
uses: actions/download-artifact@v4
106120
with:
107121
name: ubuntu-22.04
108122
path: test-results
109123

110124
- name: Download Test And Coverage Results (windows-2022)
111-
uses: actions/download-artifact@v3
125+
uses: actions/download-artifact@v4
112126
with:
113127
name: windows-2022
114128
path: test-results
@@ -117,24 +131,20 @@ jobs:
117131
run: Get-ChildItem -Path 'test-results' -Filter *.xml -Recurse | Select-Object -ExpandProperty FullName | % { (Get-Content -LiteralPath $_) -Replace 'fullPath="[A-Za-z0-9:\-\/\\]+(src|tests)', 'fullPath="${{ github.workspace }}/$1' | Set-Content -LiteralPath $_ }
118132
shell: pwsh
119133

120-
- name: Decode Code Signing Certificate
121-
run: echo $CODE_SIGNING_CERTIFICATE_BASE64 | base64 --decode > code-signing-certificate.pfx
122-
shell: bash
123-
124134
- name: Cache NuGet Packages
125-
uses: actions/cache@v3
135+
uses: actions/cache@v4
126136
with:
127-
key: windows-2022-nuget-${{ hashFiles('Directory.Build.props') }}
137+
key: ubuntu-22.04-nuget-${{ hashFiles('Directory.Packages.props') }}
128138
path: ~/.nuget/packages
129139

130140
- name: Setup Java
131-
uses: actions/setup-java@v3
141+
uses: actions/setup-java@v4
132142
with:
133143
distribution: temurin
134144
java-version: 17
135145

136146
- name: Setup .NET
137-
uses: actions/setup-dotnet@v3
147+
uses: actions/setup-dotnet@v4
138148

139149
- name: Restore .NET Tools
140150
run: dotnet tool restore
@@ -154,8 +164,9 @@ jobs:
154164
- name: Publish NuGet Package
155165
run: dotnet cake --target=Publish
156166

157-
- uses: release-drafter/release-drafter@65c5fb495d1e69aa8c08a3317bc44ff8aabe9772
167+
# Cake sets the semVer environment variable
168+
- uses: release-drafter/release-drafter@v5
158169
with:
159-
version: ${{ env.semVer }} # Cake sets the semVer environment variable
170+
version: ${{ env.semVer }}
160171
env:
161172
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ jobs:
2424

2525
steps:
2626
- name: Checkout Repository
27-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
2828
with:
2929
lfs: true
3030

3131
- name: Initialize CodeQL
32-
uses: github/codeql-action/init@v2
32+
uses: github/codeql-action/init@v3
3333
with:
3434
languages: ${{ matrix.language }}
3535

3636
- name: Autobuild
37-
uses: github/codeql-action/autobuild@v2
37+
uses: github/codeql-action/autobuild@v3
3838

3939
- name: Perform CodeQL Analysis
40-
uses: github/codeql-action/analyze@v2
40+
uses: github/codeql-action/analyze@v3

Directory.Packages.props

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.2.1"/>
8+
<PackageVersion Include="Docker.DotNet.X509" Version="3.125.15"/>
9+
<PackageVersion Include="Docker.DotNet" Version="3.125.15"/>
10+
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0"/>
11+
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.4"/>
12+
<PackageVersion Include="SharpZipLib" Version="1.4.2"/>
13+
<PackageVersion Include="SSH.NET" Version="2023.0.0"/>
14+
<PackageVersion Include="System.Text.Json" Version="6.0.9"/>
15+
<!-- Unit and integration test dependencies: -->
16+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
17+
<PackageVersion Include="coverlet.collector" Version="6.0.0"/>
18+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6"/>
19+
<PackageVersion Include="xunit" Version="2.6.5"/>
20+
<!-- Third-party client dependencies to connect and interact with the containers: -->
21+
<PackageVersion Include="Apache.NMS.ActiveMQ" Version="2.1.0"/>
22+
<PackageVersion Include="ArangoDBNetStandard" Version="2.0.1"/>
23+
<PackageVersion Include="AWSSDK.CloudWatchLogs" Version="3.7.104.14"/>
24+
<PackageVersion Include="AWSSDK.DynamoDBv2" Version="3.7.101.42"/>
25+
<PackageVersion Include="AWSSDK.S3" Version="3.7.103.3"/>
26+
<PackageVersion Include="AWSSDK.SimpleNotificationService" Version="3.7.101.7"/>
27+
<PackageVersion Include="AWSSDK.SQS" Version="3.7.100.71"/>
28+
<PackageVersion Include="Azure.Data.Tables" Version="12.8.0"/>
29+
<PackageVersion Include="Azure.Storage.Blobs" Version="12.17.0"/>
30+
<PackageVersion Include="Azure.Storage.Queues" Version="12.15.0"/>
31+
<PackageVersion Include="ClickHouse.Client" Version="6.7.1"/>
32+
<PackageVersion Include="Confluent.Kafka" Version="2.0.2"/>
33+
<PackageVersion Include="Consul" Version="1.6.10.9"/>
34+
<PackageVersion Include="CouchbaseNetClient" Version="3.4.3"/>
35+
<PackageVersion Include="Elastic.Clients.Elasticsearch" Version="8.0.5"/>
36+
<PackageVersion Include="EventStore.Client.Grpc.Streams" Version="22.0.0"/>
37+
<PackageVersion Include="FirebirdSql.Data.FirebirdClient" Version="10.0.0"/>
38+
<PackageVersion Include="Google.Cloud.BigQuery.V2" Version="3.4.0"/>
39+
<PackageVersion Include="Google.Cloud.Bigtable.Admin.V2" Version="3.7.0"/>
40+
<PackageVersion Include="Google.Cloud.Firestore" Version="3.1.0"/>
41+
<PackageVersion Include="Google.Cloud.PubSub.V1" Version="3.5.0"/>
42+
<PackageVersion Include="Google.Cloud.Storage.V1" Version="4.6.0"/>
43+
<PackageVersion Include="InfluxDB.Client" Version="4.12.0"/>
44+
<PackageVersion Include="JanusGraph.Net" Version="1.0.0"/>
45+
<PackageVersion Include="Keycloak.Net.Core" Version="1.0.20"/>
46+
<PackageVersion Include="KubernetesClient" Version="10.1.4"/>
47+
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.32.1"/>
48+
<PackageVersion Include="Microsoft.Azure.Kusto.Data" Version="11.3.3"/>
49+
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.1.3"/>
50+
<PackageVersion Include="MongoDB.Driver" Version="2.19.0"/>
51+
<PackageVersion Include="MyCouch" Version="7.6.0"/>
52+
<PackageVersion Include="MySqlConnector" Version="2.2.5"/>
53+
<PackageVersion Include="NATS.Client" Version="1.0.8"/>
54+
<PackageVersion Include="Neo4j.Driver" Version="5.5.0"/>
55+
<PackageVersion Include="Npgsql" Version="6.0.10"/>
56+
<PackageVersion Include="Oracle.ManagedDataAccess.Core" Version="3.21.90"/>
57+
<PackageVersion Include="RabbitMQ.Client" Version="6.4.0"/>
58+
<PackageVersion Include="RavenDB.Client" Version="5.4.100"/>
59+
<PackageVersion Include="Selenium.WebDriver" Version="4.8.1"/>
60+
<PackageVersion Include="StackExchange.Redis" Version="2.6.90"/>
61+
</ItemGroup>
62+
</Project>

Packages.props

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<!-- Unit and integration test dependencies: -->
8+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
9+
<PackageVersion Include="Testcontainers.PostgreSql" Version="3.7.0"/>
10+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6"/>
11+
<PackageVersion Include="xunit" Version="2.6.5"/>
12+
<!-- Third-party client dependencies to connect and interact with the containers: -->
13+
<PackageVersion Include="Npgsql" Version="6.0.10"/>
14+
</ItemGroup>
15+
</Project>

examples/Flyway/Packages.props

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

examples/Flyway/tests/Flyway.Tests/Flyway.Tests.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3"/>
32
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
54
</PropertyGroup>
65
<ItemGroup>
7-
<PackageReference Include="JetBrains.Annotations"/>
8-
<PackageReference Include="Testcontainers.PostgreSql"/>
6+
<PackageReference Include="JetBrains.Annotations" VersionOverride="2023.3.0" PrivateAssets="All"/>
97
<PackageReference Include="Microsoft.NET.Test.Sdk"/>
8+
<PackageReference Include="Testcontainers.PostgreSql"/>
109
<PackageReference Include="xunit.runner.visualstudio"/>
1110
<PackageReference Include="xunit"/>
1211
<PackageReference Include="Npgsql"/>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
<PropertyGroup>
4+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
5+
</PropertyGroup>
6+
<ItemGroup>
7+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.1"/>
8+
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.1"/>
9+
<PackageVersion Include="Microsoft.Fast.Components.FluentUI" Version="3.5.4"/>
10+
<!-- Unit and integration test dependencies: -->
11+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
12+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.1"/>
13+
<PackageVersion Include="Testcontainers.SqlEdge" Version="3.7.0"/>
14+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6"/>
15+
<PackageVersion Include="xunit" Version="2.6.5"/>
16+
<!-- Third-party client dependencies to connect and interact with the containers: -->
17+
<PackageVersion Include="Selenium.WebDriver.ChromeDriver" Version="106.0.5249.6100"/>
18+
<PackageVersion Include="Selenium.WebDriver" Version="4.9.1"/>
19+
</ItemGroup>
20+
</Project>

examples/WeatherForecast/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env
22
ARG CSPROJ_FILE_PATH="src/WeatherForecast/WeatherForecast.csproj"
33
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
44
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID
@@ -8,9 +8,9 @@ COPY . .
88

99
RUN dotnet restore $CSPROJ_FILE_PATH
1010

11-
RUN dotnet publish $CSPROJ_FILE_PATH --configuration Release --framework net6.0 --runtime linux-x64 --self-contained false --output out /p:DebugType=None /p:DebugSymbols=false
11+
RUN dotnet publish $CSPROJ_FILE_PATH --configuration Release --framework net8.0 --runtime linux-x64 --self-contained false --output out /p:DebugType=None /p:DebugSymbols=false
1212

13-
FROM mcr.microsoft.com/dotnet/aspnet:6.0
13+
FROM mcr.microsoft.com/dotnet/aspnet:8.0
1414
ARG RESOURCE_REAPER_SESSION_ID="00000000-0000-0000-0000-000000000000"
1515
LABEL "org.testcontainers.resource-reaper-session"=$RESOURCE_REAPER_SESSION_ID
1616
WORKDIR /app

examples/WeatherForecast/Packages.props

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

examples/WeatherForecast/src/WeatherForecast.Contexts/WeatherForecast.Contexts.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3"/>
32
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
54
</PropertyGroup>
65
<ItemGroup>
7-
<PackageReference Include="JetBrains.Annotations"/>
6+
<PackageReference Include="JetBrains.Annotations" VersionOverride="2023.3.0" PrivateAssets="All"/>
87
<PackageReference Include="Microsoft.EntityFrameworkCore"/>
98
</ItemGroup>
109
<ItemGroup>
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3"/>
32
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
54
</PropertyGroup>
65
<ItemGroup>
7-
<PackageReference Include="JetBrains.Annotations"/>
8-
<PackageReference Include="System.ComponentModel.Annotations"/>
9-
<PackageReference Include="System.Text.Json"/>
6+
<PackageReference Include="JetBrains.Annotations" VersionOverride="2023.3.0" PrivateAssets="All"/>
107
</ItemGroup>
118
</Project>

examples/WeatherForecast/src/WeatherForecast.Interactors/WeatherForecast.Interactors.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Sdk Name="Microsoft.Build.CentralPackageVersions" Version="2.1.3"/>
32
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
54
</PropertyGroup>
65
<ItemGroup>
7-
<PackageReference Include="JetBrains.Annotations"/>
6+
<PackageReference Include="JetBrains.Annotations" VersionOverride="2023.3.0" PrivateAssets="All"/>
87
</ItemGroup>
98
<ItemGroup>
109
<ProjectReference Include="../WeatherForecast.Entities/WeatherForecast.Entities.csproj"/>

0 commit comments

Comments
 (0)