jobs:
- job: "build_linux_amd64"
  pool:
    vmImage: 'ubuntu-20.04'
  steps:
  - template: steps-build-docker-image.yaml
    parameters:
      language: csharp

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

  dependsOn:
    - "build_linux_amd64"
  strategy:
    matrix:
      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: steps-deploy-and-run-pytest.yaml
    parameters:
      forced_image: $(Horton.ForcedImage)
      suite: $(suite)

