name: $(BuildID)_$(BuildDefinitionName)_$(SourceBranchName)
variables:
  Horton.FrameworkRoot: $(Build.SourcesDirectory)

jobs:
- job: "build_linux_amd64"
  pool:
    vmImage: 'ubuntu-20.04'
  strategy:
    matrix:
      # node18:  { variant: node18 }
      # c:      { language: c }
      # java:   { language: java }
        # # csharp: { language: csharp }
        py39:   { variant: py39 }
        # py37:   { variant: py37 }
        # py38:   { variant: py38 }

  steps:
  - template: templates/steps-build-docker-image.yaml
    parameters:
      language: $(language)
      variant: $(variant)

- job: "test_linux_amd64"
  pool:
      vmImage: 'ubuntu-20.04'
  dependsOn:
    - "build_linux_amd64"

  strategy:
    matrix:
      # c_mqtt_iothub_module:                 { suite: c_mqtt_iothub_module }
      #c_mqttws_edgehub_module:              { suite: c_mqttws_edgehub_module }
      #java_mqtt_iothub_module:              { suite: java_mqtt_iothub_module }
      #csharp_mqtt_iothub_module:            { suite: csharp_mqtt_iothub_module }
      #csharp_mqttws_edgehub_module:         { suite: csharp_mqttws_edgehub_module }
      py39_mqtt_iothub_module_and_device:           { suite: py39_mqtt_iothub_module_and_device }
      #py37_mqtt_iothub_module_and_device_async:     { suite: py37_mqtt_iothub_module_and_device_async }
      #py38_mqtt_edgehub_module_async:               { suite: py38_mqtt_edgehub_module_async }
      #py38_mqtt_iothub_module_quick_drop:           { suite: py38_mqtt_iothub_device_quick_drop }
      #py38_mqtt_iothub_module_and_device:           { suite: py38_mqtt_iothub_module_and_device }
      #py38_mqtt_iothub_module_full_drop:           { suite: py38_mqtt_iothub_module_full_drop }
      #py39_mqtt_iothub_device_full_drop:           { suite: py38_mqtt_iothub_device_full_drop }

      #node6_mqtt_iothub_module_and_device:     { suite: node6_mqtt_iothub_module_and_device }
      #node6_mqtt_edgehub_module:    { suite: node6_mqtt_edgehub_module }
      #node6_mqttws_iothub_module_and_device:   { suite: node6_mqttws_iothub_module_and_device }
      #node6_mqttws_edgehub_module:  { suite: node6_mqttws_edgehub_module }
      #node6_amqp_iothub_module_and_device:     { suite: node6_amqp_iothub_module_and_device }
      #node6_amqp_edgehub_module:    { suite: node6_amqp_edgehub_module }
      #node6_amqpws_iothub_module_and_device:   { suite: node6_amqpws_iothub_module_and_device }
      #node6_amqpws_edgehub_module:  { suite: node6_amqpws_edgehub_module }

      #node18_mqtt_iothub_module_and_device:     { suite: node18_mqtt_iothub_module_and_device }
      #node18_mqtt_edgehub_module:                { suite: node18_mqtt_edgehub_module }
      #node18_mqttws_iothub_module_and_device:   { suite: node18_mqttws_iothub_module_and_device }
      #node18_mqttws_edgehub_module:              { suite: node18_mqttws_edgehub_module }
      #node18_amqp_iothub_module_and_device:     { suite: node18_amqp_iothub_module_and_device }
      #node18_amqp_edgehub_module:                { suite: node18_amqp_edgehub_module }
      #node18_amqpws_iothub_module_and_device:   { suite: node18_amqpws_iothub_module_and_device }
      #node18_amqpws_edgehub_module:              { suite: node18_amqpws_edgehub_module }

      #csharp_mqtt_iothub_module:    { suite: csharp_mqtt_iothub_module }
      #csharp_mqtt_edgehub_module:   { suite: csharp_mqtt_edgehub_module }
      #csharp_mqttws_iothub_module:  { suite: csharp_mqttws_iothub_module }
      #csharp_mqttws_edgehub_module: { suite: csharp_mqttws_edgehub_module }
      #csharp_amqp_iothub_module:    { suite: csharp_amqp_iothub_module }
      #csharp_amqp_edgehub_module:   { suite: csharp_amqp_edgehub_module }
      #csharp_amqpws_iothub_module:  { suite: csharp_amqpws_iothub_module }
      #csharp_amqpws_edgehub_module: { suite: csharp_amqpws_edgehub_module }


  steps:
  - template: templates/steps-deploy-and-run-pytest.yaml
    parameters:
      suite: $(suite)
      # testcase: '-k friend_to_mod'

