File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 88 branches : [main, develop]
99
1010 workflow_run :
11- workflows : [Create Prerelease, Create Release]
11+ workflows : [Create Release]
1212 types : [requested]
1313
1414permissions :
Original file line number Diff line number Diff 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+
1313jobs :
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 }}"
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Run Tests
22
33on :
44 workflow_run :
5- workflows : [Create Prerelease, Create Release]
5+ workflows : [Create Release]
66 types : [requested]
77 branches : [main, develop]
88 workflow_dispatch :
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1- <Project Sdk =" Microsoft.NET.Sdk" >
1+ <Project Sdk =" Microsoft.NET.Sdk" >
22<PropertyGroup >
33<IsPackable >true</IsPackable >
44<Authors >Stillpoint Software, Inc.</Authors >
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 >
Original file line number Diff line number Diff line change 1- using BenchmarkDotNet . Columns ;
1+ using BenchmarkDotNet . Columns ;
22using BenchmarkDotNet . Configs ;
33using BenchmarkDotNet . Diagnosers ;
44using 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 ) ;
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1- using System . Text . Json ;
1+ using System . Text . Json ;
22using System . Text . Json . Nodes ;
33using BenchmarkDotNet . Attributes ;
44using 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}
You can’t perform that action at this time.
0 commit comments