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

- job: "test_linux_amd64"
  pool:
      vmImage: 'ubuntu-20.04'
  dependsOn:
    - "build_linux_amd64"
  strategy:
    matrix:
      # ModuleClient to IotHub tests are disabled for Java because Java e2e tests outside of Horton already run these scenarios
      # java_mqtt_iothub_module:      { suite: java_mqtt_iothub_module }
      # java_mqttws_iothub_module:    { suite: java_mqttws_iothub_module }
      # java_amqp_iothub_module:      { suite: java_amqp_iothub_module }
      # java_amqpws_iothub_module:    { suite: java_amqpws_iothub_module }
      java_mqtt_edgehub_module:     { suite: java_mqtt_edgehub_module }
      java_mqttws_edgehub_module:   { suite: java_mqttws_edgehub_module }
      java_amqp_edgehub_module:     { suite: java_amqp_edgehub_module }
      java_amqpws_edgehub_module:   { suite: java_amqpws_edgehub_module }

  steps:
  - template: steps-deploy-and-run-pytest.yaml
    parameters:
      forced_image: $(Horton.ForcedImage)
      suite: $(suite)

