cache_epoch: 0 # <- increase number to clear cache.

action_cache: actions/cache@v4
action_checkout: actions/checkout@v4
action_setup_python: actions/setup-python@v5
action_upload_artifact: actions/upload-artifact@v4
action_download_artifact: actions/download-artifact@v4

skippy_enabled: true

default_python: 3.13.3

vars:
  - &dist_linux
    variant: Linux
    os: Linux
    platform: ubuntu-22.04

  - &dist_macos
    variant: macOS
    os: macOS
    platform: macos-15

  - &dist_win
    variant: Windows
    os: Windows
    platform: windows-2022

  - &dist_other
    os: Linux
    platform: ubuntu-latest

jobs:
  # Platform tests.
  - &test
    <<: *dist_linux
    type: test
    reqs: ["dist", "test"]
    skiplists: ["job_test", "os_linux"]
    test_args: -p no:pytest-qt --ignore=test/gui_qt
  - <<: *test
    <<: *dist_macos
    cache_extra_deps: ["osx/deps.sh"]
    skiplists: ["job_test", "os_macos"]
  - <<: *test
    <<: *dist_win
    skiplists: ["job_test", "os_windows"]

  # Python tests.
  - &python_test
    <<: *test
    <<: *dist_other
    variant: Python Latest Supported
    skiplists: ["job_test", "os_linux", "os_macos", "os_windows"]
  - <<: *python_test
    variant: Python 3.12
    python: "3.12"
  - <<: *python_test
    variant: Python 3.11
    python: "3.11"
  - <<: *python_test
    variant: Python 3.10
    python: "3.10"

  # Qt GUI tests.
  - <<: *test
    type: test_gui_qt
    variant: Qt GUI
    reqs: ["dist", "dist_extra_gui_qt", "test"]
    skiplists: ["job_test_gui_qt"]
    test_args: test/gui_qt

  # Packaging tests.
  - <<: *dist_other
    type: test_packaging
    variant: Packaging
    reqs: ["packaging", "setup"]
    skiplists: ["job_test_packaging"]

  # Code quality.
  - <<: *dist_other
    type: test_code_quality
    variant: Code Quality
    reqs: ["code_quality"]

  # Platform builds.
  - &build
    <<: *dist_linux
    type: build
    needs: [test_linux]
    reqs: ["build", "setup"]
    cache_extra_deps: ["reqs/dist_*.txt", "linux/appimage/deps.sh"]
    skiplists: ["job_build", "os_linux"]
  - <<: *build
    <<: *dist_macos
    needs: [test_macos]
    cache_extra_deps: ["reqs/dist_*.txt", "osx/deps.sh"]
    skiplists: ["job_build", "os_macos"]
  - <<: *build
    <<: *dist_win
    needs: [test_windows]
    cache_extra_deps: ["reqs/dist_*.txt", "windows/dist_deps.sh"]
    skiplists: ["job_build", "os_windows"]
