
  <%- for slug, display_name, arch in (("windows-2016", "Windows 2016", "amd64"),
                                       ("windows-2019", "Windows 2019", "amd64"),
                                       ("windows-2022", "Windows 2022", "amd64")) %>

  <{ slug.replace(".", "") }>:
    <%- do test_salt_needs.append(slug.replace(".", "")) %>
    name: <{ display_name }>
    if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
    needs:
      - prepare-workflow
      - build-salt-onedir
    uses: ./.github/workflows/test-action.yml
    with:
      distro-slug: <{ slug }>
      nox-session: ci-test-onedir
      platform: windows
      arch: amd64
      testrun: ${{ needs.prepare-workflow.outputs.testrun }}
      salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
      cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }>
      skip-code-coverage: <{ skip_test_coverage_check }>
      skip-junit-reports: <{ skip_junit_reports_check }>

  <%- endfor %>

  <%- for slug, display_name, arch in (("macos-12", "macOS 12", "x86_64"),) %>

  <{ slug.replace(".", "") }>:
    <%- do test_salt_needs.append(slug.replace(".", "")) %>
    name: <{ display_name }>
    if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['github-hosted'] }}
    needs:
      - prepare-workflow
      - build-salt-onedir
    uses: ./.github/workflows/test-action-macos.yml
    with:
      distro-slug: <{ slug }>
      nox-session: ci-test-onedir
      platform: darwin
      arch: x86_64
      testrun: ${{ needs.prepare-workflow.outputs.testrun }}
      salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
      cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }>
      skip-code-coverage: <{ skip_test_coverage_check }>
      skip-junit-reports: <{ skip_junit_reports_check }>

  <%- endfor %>

  <%- for slug, display_name, arch in (("almalinux-8", "Alma Linux 8", "x86_64"),
                                       ("almalinux-9", "Alma Linux 9", "x86_64"),
                                       ("amazonlinux-2", "Amazon Linux 2", "x86_64"),
                                       ("archlinux-lts", "Arch Linux LTS", "x86_64"),
                                       ("centos-7", "CentOS 7", "x86_64"),
                                       ("centosstream-8", "CentOS Stream 8", "x86_64"),
                                       ("centosstream-9", "CentOS Stream 9", "x86_64"),
                                       ("debian-10", "Debian 10", "x86_64"),
                                       ("debian-11", "Debian 11", "x86_64"),
                                       ("debian-11-arm64", "Debian 11 Arm64", "aarch64"),
                                       ("fedora-37", "Fedora 37", "x86_64"),
                                       ("fedora-38", "Fedora 38", "x86_64"),
                                       ("opensuse-15", "Opensuse 15", "x86_64"),
                                       ("photonos-3", "Photon OS 3", "x86_64"),
                                       ("photonos-4", "Photon OS 4", "x86_64"),
                                       ("ubuntu-20.04", "Ubuntu 20.04", "x86_64"),
                                       ("ubuntu-20.04-arm64", "Ubuntu 20.04 Arm64", "aarch64"),
                                       ("ubuntu-22.04", "Ubuntu 22.04", "x86_64"),
                                       ("ubuntu-22.04-arm64", "Ubuntu 22.04 Arm64", "aarch64")) %>

  <{ slug.replace(".", "") }>:
    <%- do test_salt_needs.append(slug.replace(".", "")) %>
    name: <{ display_name }>
    if: ${{ fromJSON(needs.prepare-workflow.outputs.jobs)['test'] && fromJSON(needs.prepare-workflow.outputs.runners)['self-hosted'] }}
    needs:
      - prepare-workflow
      - build-salt-onedir
    uses: ./.github/workflows/test-action.yml
    with:
      distro-slug: <{ slug }>
      nox-session: ci-test-onedir
      platform: linux
      arch: <{ arch }>
      testrun: ${{ needs.prepare-workflow.outputs.testrun }}
      salt-version: "${{ needs.prepare-workflow.outputs.salt-version }}"
      cache-prefix: ${{ needs.prepare-workflow.outputs.cache-seed }}|<{ python_version }>
      skip-code-coverage: <{ skip_test_coverage_check }>
      skip-junit-reports: <{ skip_junit_reports_check }>

  <%- endfor %>
