Ejemplo n.º 1
0
Archivo: ci_cd.py Proyecto: cc13ny/beam
def cd_step():
    """
    CD step to save all beam examples/tests/katas and their outputs on the Google Cloud
    """
    root_dir = os.getenv("BEAM_ROOT_DIR")
    cd_helper = CDHelper()
    examples = find_examples(root_dir)
    cd_helper.store_examples(examples)
Ejemplo n.º 2
0
def cd_step():
    """
  CD step to save all beam examples/tests/katas and their outputs on the GCS
  """
    setup_logger()
    root_dir = os.getenv("BEAM_ROOT_DIR")
    categories_file = os.getenv("BEAM_EXAMPLE_CATEGORIES")
    supported_categories = get_supported_categories(categories_file)
    cd_helper = CDHelper()
    examples = find_examples(root_dir, supported_categories)
    cd_helper.store_examples(examples)
Ejemplo n.º 3
0
def _cd_step(examples: List[Example]):
  """
  CD step to save all beam examples/tests/katas and their outputs on the GCS
  """
  cd_helper = CDHelper()
  cd_helper.store_examples(examples)
Ejemplo n.º 4
0
def test_store_examples(mock_run_code, mock_save_to_cloud):
    helper = CDHelper()
    helper.store_examples([])

    mock_run_code.assert_called_once_with([])
    mock_save_to_cloud.assert_called_once_with([])