trigger:
  - main

pool:
  vmImage: ubuntu-latest

jobs:
  - job: Verify
    strategy:
      matrix:
        python310:
          pythonVersion: "3.10"
          toxEnv: py310
        python311:
          pythonVersion: "3.11"
          toxEnv: py311
        python312:
          pythonVersion: "3.12"
          toxEnv: py312
      maxParallel: 2
    timeoutInMinutes: 30
    steps:
      - task: UsePythonVersion@0
        inputs:
          versionSpec: $(pythonVersion)
      - script: python -m tox -e $(toxEnv)
        displayName: Run $(toxEnv)
      - task: PublishTestResults@2
        condition: succeededOrFailed()
        inputs:
          testResultsFormat: JUnit
          testResultsFiles: reports/junit.xml
