name: Run corpus tests

on:
  schedule:
    # Every day at 00:00
    - cron: "0 0 * * *"
  workflow_dispatch:

jobs:

  corpus-default:
    name: Default corpus tests
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
          submodules: true

      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"

      - uses: astral-sh/setup-uv@v7

      - run: uvx --from=".[tests]" pytest test-corpus/test_corpus.py -n auto -k test_default --durations=20 --dist=worksteal

  corpus-coverage:
    name: Corpus tests for the coverage phase
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
          submodules: true

      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"

      - uses: astral-sh/setup-uv@v7

      - run: uvx --from=".[tests]" pytest test-corpus/test_corpus.py -n auto -k test_coverage_phase --durations=20 --dist=worksteal

  corpus-inference:
    name: Corpus tests for dependency inference
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
          submodules: true

      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"

      - uses: astral-sh/setup-uv@v7

      - run: uvx --from=".[tests]" pytest test-corpus/test_inference.py -n auto --durations=20 --dist=worksteal

  corpus-stateful:
    name: Corpus tests for stateful testing
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 1
          submodules: true

      - uses: actions/setup-python@v6
        with:
          python-version: "3.14"

      - uses: astral-sh/setup-uv@v7

      - run: uvx --from=".[tests]" pytest test-corpus/test_corpus.py -n auto -k test_stateful --durations=20 --dist=worksteal
