Skip to content

Commit 730c34f

Browse files
Merge branch 'develop' into fix-left-function-compare
2 parents dfce0a5 + 2dee0b9 commit 730c34f

13 files changed

Lines changed: 66 additions & 31 deletions

File tree

.github/workflows/create_release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ jobs:
4444
VERSION='${{ inputs.version }}'
4545
INCR='${{ inputs.increment }}'
4646
if [[ "$MODE" == "explicit" && -z "$VERSION" ]]; then
47-
echo " mode=explicit requires 'version' (e.g., 1.3-alpha)."; exit 1
47+
echo "? mode=explicit requires 'version' (e.g., 1.3-alpha)."; exit 1
4848
fi
4949
if [[ "$MODE" == "bump" && -z "$INCR" ]]; then
50-
echo " mode=bump requires 'increment' (major|minor|patch)."; exit 1
50+
echo "? mode=bump requires 'increment' (major|minor|patch)."; exit 1
5151
fi
52-
echo " inputs look good."
52+
echo "? inputs look good."
5353
5454
set-version:
5555
needs: validate-inputs

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches: [main, develop]
99

1010
workflow_run:
11-
workflows: [Create Prerelease, Create Release]
11+
workflows: [Create Release]
1212
types: [requested]
1313

1414
permissions:

.github/workflows/pack_publish.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ permissions:
88
contents: write
99
pull-requests: write
1010
packages: write
11-
statuses: write
12-
11+
statuses: write
12+
1313
jobs:
1414
set-config:
1515
uses: Stillpoint-Software/shared-workflows/.github/workflows/determine_build_configuration.yml@main
@@ -18,17 +18,26 @@ jobs:
1818
target_branch: ${{ github.event.release.target_commitish }}
1919
override_build_configuration: ''
2020
prerelease: ${{ github.event.release.prerelease }} # true/false from the release
21-
22-
publish:
21+
22+
tests:
2323
needs: set-config
24+
uses: Stillpoint-Software/shared-workflows/.github/workflows/run_tests.yml@main
25+
with:
26+
branch: ${{ github.event.release.target_commitish }}
27+
solution_name: ${{ vars.SOLUTION_NAME }}
28+
29+
publish:
30+
needs: [set-config, tests]
2431
uses: Stillpoint-Software/shared-workflows/.github/workflows/pack_and_publish.yml@main
2532
with:
2633
build_configuration: ${{ needs.set-config.outputs.build_configuration }}
2734
secrets:
2835
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
36+
2937
result:
30-
needs: [publish]
38+
needs: [publish, tests]
3139
if: always()
3240
runs-on: ubuntu-latest
3341
steps:
42+
- run: echo "Tests result = ${{ needs.tests.result }}"
3443
- run: echo "Pack & Publish result = ${{ needs.publish.result }}"

.github/workflows/run_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Run Tests
22

33
on:
44
workflow_run:
5-
workflows: [Create Prerelease, Create Release]
5+
workflows: [Create Release]
66
types: [requested]
77
branches: [main, develop]
88
workflow_dispatch:

nuget.config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<packageSources>
4+
<clear />
5+
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
6+
</packageSources>
7+
</configuration>

src/Hyperbee.Json/Hyperbee.Json.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<IsPackable>true</IsPackable>
44
<Authors>Stillpoint Software, Inc.</Authors>
@@ -32,8 +32,7 @@
3232
<None Include="..\..\assets\icon.png" Pack="true" Visible="false" PackagePath="/" />
3333
<None Include="..\..\README.md" Pack="true" Visible="true" PackagePath="/" Link="README.md" />
3434
<None Include="..\..\LICENSE" Pack="true" Visible="false" PackagePath="/" />
35-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" />
36-
<PackageReference Include="Microsoft.SourceLink.GitHub" />
37-
<PackageReference Include="Nerdbank.GitVersioning" />
35+
<PackageReference Update="Microsoft.SourceLink.GitHub" />
36+
<PackageReference Update="Nerdbank.GitVersioning" />
3837
</ItemGroup>
3938
</Project>

test/Hyperbee.Json.Benchmark/Helpers/Config.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using BenchmarkDotNet.Columns;
1+
using BenchmarkDotNet.Columns;
22
using BenchmarkDotNet.Configs;
33
using BenchmarkDotNet.Diagnosers;
44
using BenchmarkDotNet.Environments;
@@ -13,17 +13,18 @@ public class Config : ManualConfig
1313
{
1414
public Config()
1515
{
16+
1617
AddJob( Job.ShortRun
17-
.WithRuntime( CoreRuntime.Core90 )
18-
.WithId( ".NET 8" ) );
18+
.WithRuntime( CoreRuntime.Core90 )
19+
.WithId( ".NET 8" ) );
1920

2021
AddJob( Job.ShortRun
2122
.WithRuntime( CoreRuntime.Core90 )
2223
.WithId( ".NET 9" ) );
2324

2425
AddJob( Job.ShortRun
25-
.WithRuntime( CoreRuntime.Core10_0 )
26-
.WithId( ".NET 10" ) );
26+
.WithRuntime( CoreRuntime.Core10_0 )
27+
.WithId( ".NET 10" ) );
2728

2829
AddValidator( JitOptimizationsValidator.DontFailOnError );
2930
AddLogger( ConsoleLogger.Default );

test/Hyperbee.Json.Benchmark/Hyperbee.Json.Benchmark.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
<PackageReference Include="JsonCraft.JsonPath" />
2828
</ItemGroup>
2929

30+
<!-- JsonCraft.JsonPath is only available for .NET 9.0 and later -->
31+
<ItemGroup Condition="'$(TargetFramework)' != 'net8.0'">
32+
<PackageReference Include="JsonCraft.JsonPath" />
33+
</ItemGroup>
34+
3035
<ItemGroup>
3136
<ProjectReference Include="..\..\src\Hyperbee.Json\Hyperbee.Json.csproj" />
3237
</ItemGroup>

test/Hyperbee.Json.Benchmark/JsonPathBenchmark.cs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Text.Json;
1+
using System.Text.Json;
22
using System.Text.Json.Nodes;
33
using BenchmarkDotNet.Attributes;
44
using BenchmarkDotNet.Engines;
@@ -195,4 +195,18 @@ public void JsonCons_JsonElement()
195195

196196
Consume( select, first );
197197
}
198+
199+
#if NET9_0_OR_GREATER
200+
[Benchmark( Description = "JsonCraft.JsonElement" )]
201+
public void JsonCraft_JsonElement()
202+
{
203+
var (filter, first) = GetFilter();
204+
205+
var element = JsonDocument.Parse( Document ).RootElement;
206+
var select = JsonCraft.JsonPath.JsonExtensions.SelectElements( element, filter );
207+
208+
Consume( select, first );
209+
}
210+
#endif
211+
198212
}

test/Hyperbee.Json.Cts.lnk

1.36 KB
Binary file not shown.

0 commit comments

Comments
 (0)