def test_noarch_skips_travis(noarch_recipe, jinja_env): cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=noarch_recipe.config, forge_dir=noarch_recipe.recipe, ) # this configuration should be skipped assert not noarch_recipe.config["travis"]["enabled"] assert not os.path.isdir(os.path.join(noarch_recipe.recipe, ".ci_support"))
def test_noarch_skips_travis(noarch_recipe, jinja_env): cnfgr_fdstk.render_travis(jinja_env=jinja_env, forge_config=noarch_recipe.config, forge_dir=noarch_recipe.recipe) # this configuration should be skipped assert not noarch_recipe.config['travis']['enabled'] # no appveyor.yaml should have been written. Nothing else, either, since we only ran # appveyor render. No matrix dir should exist. assert not os.path.isdir(os.path.join(noarch_recipe.recipe, '.ci_support'))
def test_py_matrix_travis(py_recipe, jinja_env): cnfgr_fdstk.render_travis(jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=py_recipe.recipe) # this configuration should be run assert py_recipe.config['travis']['enabled'] matrix_dir = os.path.join(py_recipe.recipe, '.ci_support') assert os.path.isdir(matrix_dir) # two matrix enties - one per py ver assert len(os.listdir(matrix_dir)) == 2
def test_noarch_skips_travis(noarch_recipe, jinja_env): cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=noarch_recipe.config, forge_dir=noarch_recipe.recipe, ) # this configuration should be skipped assert not noarch_recipe.config["travis"]["enabled"] # no appveyor.yaml should have been written. Nothing else, either, since we only ran # appveyor render. No matrix dir should exist. assert not os.path.isdir(os.path.join(noarch_recipe.recipe, ".ci_support"))
def test_r_matrix_travis(r_recipe, jinja_env): cnfgr_fdstk.render_travis(jinja_env=jinja_env, forge_config=r_recipe.config, forge_dir=r_recipe.recipe) # this configuration should be run assert r_recipe.config['travis']['enabled'] # no appveyor.yaml should have been written. Nothing else, either, since we only ran # appveyor render. No matrix dir should exist. matrix_dir = os.path.join(r_recipe.recipe, '.ci_support') assert os.path.isdir(matrix_dir) # single matrix entry - readme is generated later in main function assert len(os.listdir(matrix_dir)) == 2
def test_py_matrix_travis(py_recipe, jinja_env): py_recipe.config["provider"]["osx"] = "travis" cnfgr_fdstk.render_travis(jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=py_recipe.recipe) # this configuration should be run assert py_recipe.config["travis"]["enabled"] matrix_dir = os.path.join(py_recipe.recipe, ".ci_support") assert os.path.isdir(matrix_dir) # two matrix enties - one per py ver assert len(os.listdir(matrix_dir)) == 2
def test_py_matrix_travis(py_recipe, jinja_env): cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=py_recipe.recipe, ) # this configuration should be run assert py_recipe.config["travis"]["enabled"] matrix_dir = os.path.join(py_recipe.recipe, ".ci_support") assert os.path.isdir(matrix_dir) # two matrix enties - one per py ver assert len(os.listdir(matrix_dir)) == 2
def test_r_matrix_travis(r_recipe, jinja_env): r_recipe.config["provider"]["osx"] = "travis" cnfgr_fdstk.render_travis(jinja_env=jinja_env, forge_config=r_recipe.config, forge_dir=r_recipe.recipe) # this configuration should be run assert r_recipe.config["travis"]["enabled"] matrix_dir = os.path.join(r_recipe.recipe, ".ci_support") assert os.path.isdir(matrix_dir) # single matrix entry - readme is generated later in main function assert len(os.listdir(matrix_dir)) == 2
def test_r_matrix_travis(r_recipe, jinja_env): cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=r_recipe.config, forge_dir=r_recipe.recipe, ) # this configuration should be run assert r_recipe.config["travis"]["enabled"] # no appveyor.yaml should have been written. Nothing else, either, since we only ran # appveyor render. No matrix dir should exist. matrix_dir = os.path.join(r_recipe.recipe, ".ci_support") assert os.path.isdir(matrix_dir) # single matrix entry - readme is generated later in main function assert len(os.listdir(matrix_dir)) == 2
def test_circle_osx(py_recipe, jinja_env): # Set legacy providers py_recipe.config["provider"]["osx"] = "travis" py_recipe.config["provider"]["linux"] = "circle" forge_dir = py_recipe.recipe travis_yml_file = os.path.join(forge_dir, ".travis.yml") circle_osx_file = os.path.join(forge_dir, ".scripts", "run_osx_build.sh") circle_linux_file = os.path.join( forge_dir, ".scripts", "run_docker_build.sh" ) circle_config_file = os.path.join(forge_dir, ".circleci", "config.yml") cnfgr_fdstk.clear_scripts(forge_dir) cnfgr_fdstk.render_circle( jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=forge_dir ) assert not os.path.exists(circle_osx_file) assert os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file) cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=forge_dir ) assert os.path.exists(travis_yml_file) cnfgr_fdstk.clear_scripts(forge_dir) config = copy.deepcopy(py_recipe.config) config["provider"]["osx"] = "circle" cnfgr_fdstk.render_circle( jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir ) assert os.path.exists(circle_osx_file) assert os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file) cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir ) assert not os.path.exists(travis_yml_file) cnfgr_fdstk.clear_scripts(forge_dir) config = copy.deepcopy(py_recipe.config) config["provider"]["linux"] = "dummy" config["provider"]["osx"] = "circle" cnfgr_fdstk.render_circle( jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir ) assert os.path.exists(circle_osx_file) assert not os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file)
def test_circle_osx(py_recipe, jinja_env): forge_dir = py_recipe.recipe travis_yml_file = os.path.join(forge_dir, ".travis.yml") circle_osx_file = os.path.join(forge_dir, ".circleci", "run_osx_build.sh") circle_linux_file = os.path.join( forge_dir, ".circleci", "run_docker_build.sh" ) circle_config_file = os.path.join(forge_dir, ".circleci", "config.yml") cnfgr_fdstk.render_circle( jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=forge_dir ) assert not os.path.exists(circle_osx_file) assert os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file) cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=forge_dir ) assert os.path.exists(travis_yml_file) config = copy.deepcopy(py_recipe.config) config["provider"]["osx"] = "circle" cnfgr_fdstk.render_circle( jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir ) assert os.path.exists(circle_osx_file) assert os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file) cnfgr_fdstk.render_travis( jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir ) assert not os.path.exists(travis_yml_file) config = copy.deepcopy(py_recipe.config) config["provider"]["linux"] = "dummy" config["provider"]["osx"] = "circle" cnfgr_fdstk.render_circle( jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir ) assert os.path.exists(circle_osx_file) assert not os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file)
def test_circle_osx(py_recipe, jinja_env): forge_dir = py_recipe.recipe travis_yml_file = os.path.join(forge_dir, '.travis.yml') circle_osx_file = os.path.join(forge_dir, '.circleci', 'run_osx_build.sh') circle_linux_file = os.path.join(forge_dir, '.circleci', 'run_docker_build.sh') circle_config_file = os.path.join(forge_dir, '.circleci', 'config.yml') cnfgr_fdstk.render_circle(jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=forge_dir) assert not os.path.exists(circle_osx_file) assert os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file) cnfgr_fdstk.render_travis(jinja_env=jinja_env, forge_config=py_recipe.config, forge_dir=forge_dir) assert os.path.exists(travis_yml_file) config = copy.deepcopy(py_recipe.config) config['provider']['osx'] = 'circle' cnfgr_fdstk.render_circle(jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir) assert os.path.exists(circle_osx_file) assert os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file) cnfgr_fdstk.render_travis(jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir) assert not os.path.exists(travis_yml_file) config = copy.deepcopy(py_recipe.config) config['provider']['linux'] = 'dummy' config['provider']['osx'] = 'circle' cnfgr_fdstk.render_circle(jinja_env=jinja_env, forge_config=config, forge_dir=forge_dir) assert os.path.exists(circle_osx_file) assert not os.path.exists(circle_linux_file) assert os.path.exists(circle_config_file)