From e08d205053569cc06071cffa19e8009264b9b291 Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 9 Jun 2020 12:36:53 -0400 Subject: [PATCH] check for actionsification --- adabot/arduino_libraries.py | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/adabot/arduino_libraries.py b/adabot/arduino_libraries.py index ecfe387..b401c52 100644 --- a/adabot/arduino_libraries.py +++ b/adabot/arduino_libraries.py @@ -166,6 +166,12 @@ def validate_travis(repo): repo_has_travis = requests.get("https://raw.githubusercontent.com/adafruit/" + repo["name"] + "/master/.travis.yml") return repo_has_travis.ok +def validate_actions(repo): + """Validate if a repo has actions githubci.yml + """ + repo_has_actions = requests.get("https://raw.githubusercontent.com/adafruit/" + repo["name"] + "/master/.github/workflows/githubci.yml") + return repo_has_actions.ok + def validate_example(repo): """Validate if a repo has any files in examples directory """ @@ -181,7 +187,7 @@ def run_arduino_lib_checks(): failed_lib_prop = [[" Repo", "Release Tag", "library.properties Version"], [" ----", "-----------", "--------------------------"]] needs_release_list = [[" Repo", "Latest Release", "Commits Behind"], [" ----", "--------------", "--------------"]] needs_registration_list = [[" Repo"], [" ----"]] - missing_travis_list = [[" Repo"], [" ----"]] + missing_ci_list = [[" Repo"], [" ----"]] missing_library_properties_list = [[" Repo"], [" ----"]] for repo in repo_list: @@ -217,10 +223,10 @@ def run_arduino_lib_checks(): if needs_release: needs_release_list.append([" " + str(repo["name"]), needs_release[0], needs_release[1]]) - missing_travis = not validate_travis(repo) - entry['needs_travis'] = missing_travis - if missing_travis: - missing_travis_list.append([" " + str(repo["name"])]) + missing_ci = not validate_travis(repo) and not validate_actions(repo) + entry['needs_ci'] = missing_ci + if missing_ci: + missing_ci_list.append([" " + str(repo["name"])]) all_libraries.append(entry) @@ -236,8 +242,8 @@ def run_arduino_lib_checks(): if len(needs_release_list) > 2: print_list_output("Libraries have commits since last release: ({})", needs_release_list); - if len(missing_travis_list) > 2: - print_list_output("Libraries that is not configured with Travis: ({})", missing_travis_list) + if len(missing_ci_list) > 2: + print_list_output("Libraries that is not configured with Travis or Actions: ({})", missing_ci_list) if len(missing_library_properties_list) > 2: print_list_output("Libraries that is missing library.properties file: ({})", missing_library_properties_list)