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

- job: "test_linux_amd64"
  pool:
      vmImage: 'ubuntu-20.04'
  dependsOn:
    - "build_linux_amd64"
  strategy:
    matrix:
      node18_mqtt_iothub_module:      { suite: node18_mqtt_iothub_module }
      node18_mqtt_edgehub_module:     { suite: node18_mqtt_edgehub_module }
      node18_mqttws_iothub_module:    { suite: node18_mqttws_iothub_module }
      node18_mqttws_edgehub_module:   { suite: node18_mqttws_edgehub_module }
      node18_amqp_iothub_module:      { suite: node18_amqp_iothub_module }
      node18_amqp_edgehub_module:     { suite: node18_amqp_edgehub_module }
      node18_amqpws_iothub_module:    { suite: node18_amqpws_iothub_module }
      node18_amqpws_edgehub_module:   { suite: node18_amqpws_edgehub_module }

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