name: Performance

on:
#  push:
  workflow_dispatch:

jobs:
  ConfigParams:
    uses: pyTooling/Actions/.github/workflows/ExtractConfiguration.yml@r7

  PerformanceTestingParams:
    uses: pyTooling/Actions/.github/workflows/Parameters.yml@r7
    with:
      name: Performance
      python_version_list: "3.12 3.13 3.14 pypy-3.11"
      system_list: "ubuntu windows macos macos-arm"
      pipeline-delay: 300

  PerformanceTesting:
    uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@r7
    needs:
      - ConfigParams
      - PerformanceTestingParams
    with:
      jobs:                  ${{ needs.PerformanceTestingParams.outputs.python_jobs }}
      requirements:          '-r tests/performance/requirements.txt'
      unittest_directory:    'performance'
      unittest_report_xml:   ${{ needs.ConfigParams.outputs.unittest_report_xml }}
      coverage_report_html:  ${{ needs.ConfigParams.outputs.coverage_report_html }}
      unittest_xml_artifact: 'pyTooling-PerformanceTestReportSummary-XML'

#  PublishTestResults:
#    uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@r7
#    needs:
##      - PerformanceTesting
#    with:
#      unittest_artifacts_pattern: "*-PerformanceTestReportSummary-XML-*"
#      report_title: Performance Test Summary
#      merged_junit_artifact: pyTooling-PerformanceTestReportSummary-XML
