def test_github_ci_windows_38( tmp_pathplus: PathPlus, demo_environment, advanced_file_regression: AdvancedFileRegressionFixture, ): demo_environment.globals["github_ci_requirements"] = { "macOS": { "pre": [], "post": [] } } demo_environment.globals["travis_additional_requirements"] = [ "isort", "black" ] demo_environment.globals["platforms"] = ["macOS"] demo_environment.globals["pure_python"] = False demo_environment.globals["py_versions"] = ["3.6", "3.7", "3.8"] managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_file_regression.check_file(tmp_pathplus / managed_files[1]) demo_environment.globals["py_versions"] = ["3.6", "3.7"] managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_file_regression.check_file(tmp_pathplus / managed_files[1])
def test_make_github_linux_case_3( tmp_pathplus: PathPlus, advanced_file_regression: AdvancedFileRegressionFixture, demo_environment, pure_python, enable_conda, enable_tests, enable_releases, advanced_data_regression: AdvancedDataRegressionFixture, ): demo_environment.globals["platforms"] = ["Linux"] demo_environment.globals["pure_python"] = pure_python demo_environment.globals["enable_tests"] = enable_conda demo_environment.globals["enable_conda"] = enable_tests demo_environment.globals["enable_releases"] = enable_releases managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_data_regression.check(managed_files, basename="github_ci_managed_files") assert not (tmp_pathplus / managed_files[0]).is_file() assert not (tmp_pathplus / managed_files[1]).is_file() assert (tmp_pathplus / managed_files[2]).is_file() advanced_file_regression.check_file(tmp_pathplus / managed_files[2])
def test_make_github_linux_case_2( tmp_pathplus: PathPlus, demo_environment, advanced_file_regression: AdvancedFileRegressionFixture, advanced_data_regression: AdvancedDataRegressionFixture, ): demo_environment.globals["platforms"] = ["Linux"] demo_environment.globals["travis_ubuntu_version"] = "bionic" demo_environment.globals["github_ci_requirements"] = { "Linux": { "pre": ["sudo apt update"], "post": ["sudo apt install python3-gi"] } } demo_environment.globals["travis_additional_requirements"] = [ "isort", "black" ] demo_environment.globals["enable_tests"] = False demo_environment.globals["enable_conda"] = False demo_environment.globals["enable_releases"] = False managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_data_regression.check(managed_files, basename="github_ci_managed_files") assert not (tmp_pathplus / managed_files[0]).is_file() assert not (tmp_pathplus / managed_files[1]).is_file() assert (tmp_pathplus / managed_files[2]).is_file() advanced_file_regression.check_file(tmp_pathplus / managed_files[2])
def test_github_ci_case_3( tmp_pathplus: PathPlus, demo_environment, advanced_data_regression: AdvancedDataRegressionFixture, ): demo_environment.globals["github_ci_requirements"] = { "Windows": { "pre": [], "post": [] }, "macOS": { "pre": [], "post": [] } } demo_environment.globals["platforms"] = ["Windows", "macOS"] managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_data_regression.check(managed_files, basename="github_ci_managed_files") assert (tmp_pathplus / managed_files[0]).is_file() assert (tmp_pathplus / managed_files[1]).is_file() # This time the files should be removed demo_environment.globals.update(dict(platforms=[], )) assert (tmp_pathplus / managed_files[0]).is_file() assert (tmp_pathplus / managed_files[1]).is_file() managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_data_regression.check(managed_files, basename="github_ci_managed_files") assert not (tmp_pathplus / managed_files[0]).is_file() assert not (tmp_pathplus / managed_files[1]).is_file()
def test_make_github_linux_case_1( tmp_pathplus: PathPlus, demo_environment, advanced_file_regression: AdvancedFileRegressionFixture, advanced_data_regression: AdvancedDataRegressionFixture, ): demo_environment.globals["platforms"] = ["Linux"] managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_data_regression.check(managed_files, basename="github_ci_managed_files") assert not (tmp_pathplus / managed_files[0]).is_file() assert not (tmp_pathplus / managed_files[1]).is_file() assert (tmp_pathplus / managed_files[2]).is_file() advanced_file_regression.check_file(tmp_pathplus / managed_files[2])
def test_github_ci_case_1( tmp_pathplus: PathPlus, demo_environment, advanced_file_regression: AdvancedFileRegressionFixture, advanced_data_regression: AdvancedDataRegressionFixture, ): demo_environment.globals["github_ci_requirements"] = { "Windows": { "pre": [], "post": [] } } managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_data_regression.check(managed_files, basename="github_ci_managed_files") assert (tmp_pathplus / managed_files[0]).is_file() assert not (tmp_pathplus / managed_files[1]).is_file() advanced_file_regression.check_file(tmp_pathplus / managed_files[0])
def test_github_ci_case_2( tmp_pathplus: PathPlus, demo_environment, advanced_file_regression: AdvancedFileRegressionFixture, advanced_data_regression: AdvancedDataRegressionFixture, ): demo_environment.globals["travis_additional_requirements"] = [ "isort", "black" ] demo_environment.globals["platforms"] = ["macOS"] demo_environment.globals["github_ci_requirements"] = { "macOS": { "pre": [], "post": [] } } managed_files = make_github_ci(tmp_pathplus, demo_environment) advanced_data_regression.check(managed_files, basename="github_ci_managed_files") assert not (tmp_pathplus / managed_files[0]).is_file() assert (tmp_pathplus / managed_files[1]).is_file() advanced_file_regression.check_file(tmp_pathplus / managed_files[1])