name: Lambda Smoke Tests

on:
  pull_request:
    branches:
      - main

jobs:
  # ============================================================
  # Ara Engine
  # ============================================================
  ara_engine_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/docker/engine.Dockerfile
      build_context: .
      service_name: ara-engine

  # ============================================================
  # Address 2 UPRN
  # ============================================================
  address2uprn_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/address2UPRN/handler/Dockerfile
      build_context: .
      service_name: address2uprn

  # ============================================================
  # Postcode Splitter
  # ============================================================
  postcode_splitter_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/postcode_splitter/handler/Dockerfile
      build_context: .
      service_name: postcode-splitter

  postcode_splitter_ddd_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: applications/postcode_splitter/Dockerfile
      build_context: .
      service_name: postcode-splitter-ddd

  # ============================================================
  # Bulk Address2UPRN Combiner
  # ============================================================
  bulk_address2uprn_combiner_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/bulk_address2uprn_combiner/handler/Dockerfile
      build_context: .
      service_name: bulk-address2uprn-combiner

  # ============================================================
  # Condition ETL
  # ============================================================
  condition_etl_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/condition/handler/Dockerfile
      build_context: .
      service_name: condition-etl

  # ============================================================
  # Categorisation
  # ============================================================
  categorisation_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/categorisation/handler/Dockerfile
      build_context: .
      service_name: categorisation

  # ============================================================
  # Ordnance Survey
  # ============================================================
  ordnance_survey_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/ordnanceSurvey/handler/Dockerfile
      build_context: .
      service_name: ordnance-survey

  # ============================================================
  # Pas Hub Fetcher
  # ============================================================
  pashub_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/pashub_fetcher/handler/Dockerfile
      build_context: .
      service_name: pashub

  # ============================================================
  # MagicPlan
  # ============================================================
  magic_plan_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: backend/magic_plan/handler/Dockerfile
      build_context: .
      service_name: magic-plan

  # ============================================================
  # HubSpot Scraper
  # ============================================================
  hubspot_scraper_smoke_test:
    uses: ./.github/workflows/_smoke_test_lambda.yml
    with:
      dockerfile_path: etl/hubspot/scripts/scraper/handler/Dockerfile
      build_context: .
      service_name: hubspot-scraper
