name: Manual Test Runner
run-name: "Manual Pytest: ${{ inputs.engine_name }} on ${{ inputs.os }} @ Python ${{ inputs.python_version }}"

on:
  workflow_dispatch:
    inputs:
      os:
        description: "Operating system for the test"
        required: true
        type: choice
        default: ubuntu-latest
        options:
          - ubuntu-latest
          - ubuntu-24.04-arm
          - windows-latest
          - windows-11-arm
          - macos-15
          - macos-15-intel
          - macos-26

      python_version:
        description: "Python version to use"
        required: true
        type: choice
        default: "3.10"
        options:
          - "3.10"
          - "3.11"
          - "3.12"
          - "3.13"
          - "3.13t"
          - "3.14"
          - "3.14t"
          - "3.15"
          - "3.15t"

      engine_name:
        description: "Engine name (e.g., euler_engine, rk4_engine, scipy_engine, cythonized_rk4_engine, cythonized_euler_engine)"
        required: true
        type: choice
        default: rk4_engine
        options:
          - euler_engine
          - rk4_engine
          - scipy_engine
          - cythonized_euler_engine
          - cythonized_rk4_engine

      stress_test:
        description: "Enable stress tests (only runs for cythonized engines)"
        required: false
        type: boolean
        default: false

      build_wheels:
        description: "Build wheels on success testing"
        required: false
        type: boolean
        default: false

jobs:
  run_reusable_workflow:
    name: "Test ${{ inputs.engine_name }} on ${{ inputs.os }} with Python ${{ inputs.python_version }}"
    uses: ./.github/workflows/pytest-reusable.yml
    with:
      os: ${{ inputs.os }}
      python_version: ${{ inputs.python_version }}
      engine_name: ${{ inputs.engine_name }}
      stress_test: ${{ inputs.stress_test }}
      build_wheels: ${{ inputs.build_wheels }}
