@@ -432,119 +432,29 @@ jobs:
432432 run : |
433433 $env:EF_DATABASE = "pomelo_test2"
434434 dotnet test -c Release --no-build --logger "GitHubActions;report-warnings=false" test/EFCore.MySql.IntegrationTests
435- - name : Run Benchmarks
436- # Benchmarks are enabled by default. Set enableBenchmarks=false in env to disable.
437- if : ${{ env.skipTests != 'true' && github.event_name == 'pull_request' && env.enableBenchmarks == 'true' }}
435+ - name : PassKey Sample Test - Check JSON Support
436+ if : ${{ env.skipTests != 'true' }}
437+ id : check-json-support
438438 shell : pwsh
439439 run : |
440- echo "Running performance benchmarks for ${{ env.databaseServerType }} ${{ env.databaseServerVersion }}"
441-
442- # Set benchmark database connection environment variables
443- $env:BENCHMARK_DB_HOST = "localhost"
444- $env:BENCHMARK_DB_PORT = "3306"
445- $env:BENCHMARK_DB_NAME = "pomelo_benchmark"
446- $env:BENCHMARK_DB_USER = "root"
447- $env:BENCHMARK_DB_PASSWORD = "Password12!"
448-
449- # Change to benchmark directory so BenchmarkDotNet creates artifacts in the right location
450- cd benchmark/EFCore.MySql.Benchmarks
451-
452- # Run benchmark suite (quick mode for CI)
453- dotnet run -c Release -- all
440+ # MySQL 5.7.8+ supports JSON, MariaDB 10.2.4+ supports JSON (through emulation)
441+ $dbVersion = [Version]'${{ env.databaseServerVersion }}'
442+ $supportsJson = $false
454443
455- # Verify results were generated
456- if (Test-Path "BenchmarkDotNet.Artifacts")
444+ if ('${{ env.databaseServerType }}' -eq 'mysql')
457445 {
458- echo "Benchmark results generated successfully at: $(Get-Location)/BenchmarkDotNet.Artifacts"
459- Get-ChildItem -Path "BenchmarkDotNet.Artifacts" -Recurse | Select-Object -First 10 | ForEach-Object { echo " $($_.FullName)" }
446+ $supportsJson = $dbVersion -ge [Version]'5.7.8'
460447 }
461- else
448+ elseif ('${{ env.databaseServerType }}' -eq 'mariadb')
462449 {
463- echo "WARNING: BenchmarkDotNet.Artifacts directory not found"
450+ $supportsJson = $dbVersion -ge [Version]'10.2.4'
464451 }
465- - name : Upload Benchmark Results
466- if : ${{ env.skipTests != 'true' && github.event_name == 'pull_request' && env.enableBenchmarks == 'true' }}
467- uses : actions/upload-artifact@v4
468- with :
469- name : benchmark-results-${{ matrix.dbVersion }}-${{ matrix.os }}
470- path : benchmark/EFCore.MySql.Benchmarks/BenchmarkDotNet.Artifacts/**/*
471- retention-days : 30
472-
473- AggregateBenchmarkResults :
474- name : Aggregate Benchmark Results
475- needs : BuildAndTest
476- if : ${{ github.event_name == 'pull_request' && !cancelled() }}
477- runs-on : ubuntu-latest
478- steps :
479- - name : Checkout
480- uses : actions/checkout@v4
481-
482- - name : Download All Benchmark Artifacts
483- uses : actions/download-artifact@v4
484- with :
485- pattern : benchmark-results-*
486- path : ./benchmark-artifacts
487-
488- - name : List Downloaded Artifacts
489- shell : pwsh
490- run : |
491- echo "Downloaded artifacts:"
492- Get-ChildItem -Path ./benchmark-artifacts -Recurse | Select-Object -First 20 | ForEach-Object { echo " $($_.FullName)" }
493-
494- - name : Aggregate Results and Update Documentation
495- shell : pwsh
496- run : |
497- echo "Aggregating benchmark results..."
498452
499- # Copy the original DatabaseVersions.md to working directory
500- Copy-Item docs/DatabaseVersions.md ./DatabaseVersions-Updated.md
501-
502- # Run aggregation script
503- ./scripts/aggregate-benchmark-results.ps1 -ArtifactsDir ./benchmark-artifacts -OutputFile ./DatabaseVersions-Updated.md
504-
505- # Show diff
506- echo ""
507- echo "Changes made to DatabaseVersions.md:"
508- git diff --no-index docs/DatabaseVersions.md ./DatabaseVersions-Updated.md || true
509-
510- - name : Upload Updated Documentation
511- uses : actions/upload-artifact@v4
512- with :
513- name : benchmark-summary-documentation
514- path : ./DatabaseVersions-Updated.md
515- retention-days : 30
516-
517- - name : Upload Summary Comment
453+ echo "supportsJson=$supportsJson" >> $env:GITHUB_OUTPUT
454+ echo "Database ${{ env.databaseServerType }} ${{ env.databaseServerVersion }} JSON support: $supportsJson"
455+ - name : PassKey Sample Test - Run Test
456+ if : ${{ env.skipTests != 'true' && steps.check-json-support.outputs.supportsJson == 'True' }}
518457 shell : pwsh
519458 run : |
520- # Create a summary markdown for the PR
521- $summary = @"
522- ## 📊 Benchmark Results Summary
523-
524- Benchmark results have been aggregated from all database versions.
525-
526- **Download the updated documentation:**
527- - Artifact: ``benchmark-summary-documentation``
528- - File: ``DatabaseVersions-Updated.md``
529-
530- The updated file includes actual benchmark timing data replacing the ``TIME_PLACEHOLDER`` markers.
531-
532- ### How to view results:
533- 1. Go to the Actions tab for this PR
534- 2. Find the workflow run
535- 3. Download the ``benchmark-summary-documentation`` artifact
536- 4. Review the updated ``DatabaseVersions-Updated.md`` file
537- "@
538-
539- echo $summary > benchmark-summary.md
540- echo ""
541- echo "Benchmark aggregation complete!"
542- echo ""
543- cat benchmark-summary.md
544-
545- - name : Upload Summary as Artifact
546- uses : actions/upload-artifact@v4
547- with :
548- name : benchmark-summary
549- path : ./benchmark-summary.md
550- retention-days : 30
459+ echo "Running PassKey test for ${{ env.databaseServerType }} ${{ env.databaseServerVersion }} (supports JSON)"
460+ dotnet run --project samples/PassKeyTest --no-build
0 commit comments