Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
21 changes: 7 additions & 14 deletions .github/workflows/docs-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@ on:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
node_version: 20.x
node_version: 24.x
NUKE_TELEMETRY_OPTOUT: true

jobs:
run:
name: "linting, spell check and build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
name: Check out the code

- name: Lint Code Base
uses: docker://ghcr.io/igorshubovych/markdownlint-cli:latest
with:
args: "--disable MD009 -- docs/**/*.md"

- uses: actions/setup-node@v4
- uses: actions/setup-node@v6
name: Install Node.js
with:
node-version: ${{ env.node_version }}
Expand All @@ -41,17 +41,10 @@ jobs:
- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Install .NET 9.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x

- name: Install .NET 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Build docs
run: ./build.sh docs-build
23 changes: 8 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
node_version: 20.x
node_version: 24.x
NUKE_TELEMETRY_OPTOUT: true

jobs:
Expand All @@ -30,27 +30,20 @@ jobs:
os: [ ubuntu-latest ]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ env.node_version }}

- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Install .NET 9.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x

- name: Install .NET 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Build & Deploy docs preview
run: |
Expand Down
21 changes: 7 additions & 14 deletions .github/workflows/on-manual-do-nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Install .NET 9.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x

- name: Install .NET 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Install .NET Aspire workload
run: |
Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/on-push-do-ci-build-pg15-jsonnet.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build_net8.0 pg15 Json.NET
name: Build & Test - NET8 - PG15 - Newtonsoft

on:
push:
Expand All @@ -21,11 +21,11 @@ on:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
node_version: 16.x
node_version: 24.x
pg_db: marten_testing
pg_user: postgres
CONFIGURATION: Release
FRAMEWORK: net9.0
FRAMEWORK: net8.0
DISABLE_TEST_PARALLELIZATION: true
DEFAULT_SERIALIZER: "Newtonsoft"
NUKE_TELEMETRY_OPTOUT: true
Expand All @@ -52,30 +52,23 @@ jobs:
--user postgres

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Install .NET 9.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x

- name: Install .NET 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Install .NET Aspire workload
run: |
dotnet workload update
dotnet workload install aspire

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v6
with:
node-version: ${{ env.node_version }}

Expand Down
29 changes: 11 additions & 18 deletions .github/workflows/on-push-do-ci-build-pgLatest-systemtextjson.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build_net7.0 pgLatest System.Text.Json
name: Build & Test - NET10 - PGLatest - System.Text.Json

on:
push:
Expand All @@ -21,11 +21,11 @@ on:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
node_version: 16.x
node_version: 24.x
pg_db: marten_testing
pg_user: postgres
CONFIGURATION: Release
FRAMEWORK: net9.0
FRAMEWORK: net10.0
DISABLE_TEST_PARALLELIZATION: true
DEFAULT_SERIALIZER: "SystemTextJson"
NUKE_TELEMETRY_OPTOUT: true
Expand All @@ -52,30 +52,23 @@ jobs:
--user postgres

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install .NET 8.0.x
uses: actions/setup-dotnet@v3
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 8.0.x

- name: Install .NET 9.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x

- name: Install .NET 10.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 10.0.x
dotnet-version: |
8.0.x
9.0.x
10.0.x

- name: Install .NET Aspire workload
run: |
dotnet workload update
dotnet workload install aspire

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v6
with:
node-version: ${{ env.node_version }}

Expand Down
37 changes: 18 additions & 19 deletions build/build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
Expand All @@ -20,7 +21,7 @@ class Build : NukeBuild
[Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")]
readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release;

[Solution] readonly Solution Solution;
[Solution(GenerateProjects = true)] readonly Solution Solution;
[Parameter] readonly bool DisableTestParallelization = true;
[Parameter]readonly string Framework;
[Parameter] readonly string Profile;
Expand Down Expand Up @@ -55,7 +56,7 @@ class Build : NukeBuild

Target NpmInstall => _ => _
.Executes(() => NpmTasks.NpmInstall(c => c
.SetProcessArgumentConfigurator(args => args.Add("--loglevel=error"))));
.AddProcessAdditionalArguments("--loglevel=error")));

Target Compile => _ => _
.DependsOn(Restore)
Expand Down Expand Up @@ -213,7 +214,7 @@ class Build : NukeBuild
.Executes(() =>
{
// It's actually important to do a codegen write a 2nd time to prevent a temporary bug
var codegenCommands = new[] { "codegen delete", "codegen write", "codegen test", "codegen write" };
var codegenCommands = new string[][] { ["codegen", "delete"], ["codegen", "write"], ["codegen","test"], ["codegen","write"] };
foreach (var command in codegenCommands)
{
DotNetRun(s => s
Expand All @@ -233,10 +234,10 @@ class Build : NukeBuild
});

Target InitDb => _ => _
.Executes(() =>
.Executes(async () =>
{
ProcessTasks.StartProcess("docker", "compose up -d");
WaitForDatabaseToBeReady();
await WaitForDatabaseToBeReady();
});

Target InstallMdSnippets => _ => _
Expand Down Expand Up @@ -371,7 +372,7 @@ class Build : NukeBuild
}
}

var marten = Solution.GetProject("Marten").Path;
var marten = Solution.Marten.Path;
foreach (var nuget in Nugets)
{
DotNet($"remove {marten} package {nuget}");
Expand All @@ -388,7 +389,7 @@ class Build : NukeBuild
}
}

var marten = Solution.GetProject("Marten").Path;
var marten = Solution.Marten.Path;
foreach (var nuget in Nugets)
{
DotNet($"add {marten} package {nuget} --prerelease");
Expand All @@ -403,7 +404,7 @@ private void addProject(string repository, string projectName)

if (Nugets.Contains(projectName))
{
var marten = Solution.GetProject("Marten").Path;
var marten = Solution.Marten.Path;
DotNet($"add {marten} reference {path}");
}
}
Expand All @@ -414,7 +415,7 @@ private void removeProject(string repository, string projectName)

if (Nugets.Contains(projectName))
{
var marten = Solution.GetProject("Marten").Path;
var marten = Solution.Marten.Path;
DotNet($"remove {marten} reference {path}");
}

Expand All @@ -424,23 +425,21 @@ private void removeProject(string repository, string projectName)

}

private void WaitForDatabaseToBeReady()
private async Task WaitForDatabaseToBeReady()
{
var attempt = 0;
while (attempt < 10)
try
{
using (var conn = new Npgsql.NpgsqlConnection(ConnectionString + ";Pooling=false"))
{
conn.Open();
await using var conn = new Npgsql.NpgsqlConnection(ConnectionString + ";Pooling=false");
await conn.OpenAsync();

var cmd = conn.CreateCommand();
cmd.CommandText = "SELECT 1";
cmd.ExecuteNonQuery();
var cmd = conn.CreateCommand();
cmd.CommandText = "SELECT 1";
await cmd.ExecuteNonQueryAsync();

Log.Information("Postgresql is up and ready!");
break;
}
Log.Information("Postgresql is up and ready!");
break;
}
catch (Exception ex)
{
Expand Down
8 changes: 4 additions & 4 deletions build/build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RootNamespace></RootNamespace>
<NoWarn>CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
Expand All @@ -12,9 +12,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="JasperFx" Version="1.10.1" />
<PackageReference Include="Npgsql" Version="8.0.3" />
<PackageReference Include="Nuke.Common" Version="8.0.0" />
<PackageReference Include="JasperFx" Version="1.11.1" />
<PackageReference Include="Npgsql" Version="9.0.4" />
<PackageReference Include="Nuke.Common" Version="10.1.0" />
</ItemGroup>

</Project>
Loading