Skip to content

Commit e08d205

Browse files
committed
check for actionsification
1 parent 42bfc73 commit e08d205

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

adabot/arduino_libraries.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ def validate_travis(repo):
166166
repo_has_travis = requests.get("https://raw.githubusercontent.com/adafruit/" + repo["name"] + "/master/.travis.yml")
167167
return repo_has_travis.ok
168168

169+
def validate_actions(repo):
170+
"""Validate if a repo has actions githubci.yml
171+
"""
172+
repo_has_actions = requests.get("https://raw.githubusercontent.com/adafruit/" + repo["name"] + "/master/.github/workflows/githubci.yml")
173+
return repo_has_actions.ok
174+
169175
def validate_example(repo):
170176
"""Validate if a repo has any files in examples directory
171177
"""
@@ -181,7 +187,7 @@ def run_arduino_lib_checks():
181187
failed_lib_prop = [[" Repo", "Release Tag", "library.properties Version"], [" ----", "-----------", "--------------------------"]]
182188
needs_release_list = [[" Repo", "Latest Release", "Commits Behind"], [" ----", "--------------", "--------------"]]
183189
needs_registration_list = [[" Repo"], [" ----"]]
184-
missing_travis_list = [[" Repo"], [" ----"]]
190+
missing_ci_list = [[" Repo"], [" ----"]]
185191
missing_library_properties_list = [[" Repo"], [" ----"]]
186192

187193
for repo in repo_list:
@@ -217,10 +223,10 @@ def run_arduino_lib_checks():
217223
if needs_release:
218224
needs_release_list.append([" " + str(repo["name"]), needs_release[0], needs_release[1]])
219225

220-
missing_travis = not validate_travis(repo)
221-
entry['needs_travis'] = missing_travis
222-
if missing_travis:
223-
missing_travis_list.append([" " + str(repo["name"])])
226+
missing_ci = not validate_travis(repo) and not validate_actions(repo)
227+
entry['needs_ci'] = missing_ci
228+
if missing_ci:
229+
missing_ci_list.append([" " + str(repo["name"])])
224230

225231
all_libraries.append(entry)
226232

@@ -236,8 +242,8 @@ def run_arduino_lib_checks():
236242
if len(needs_release_list) > 2:
237243
print_list_output("Libraries have commits since last release: ({})", needs_release_list);
238244

239-
if len(missing_travis_list) > 2:
240-
print_list_output("Libraries that is not configured with Travis: ({})", missing_travis_list)
245+
if len(missing_ci_list) > 2:
246+
print_list_output("Libraries that is not configured with Travis or Actions: ({})", missing_ci_list)
241247

242248
if len(missing_library_properties_list) > 2:
243249
print_list_output("Libraries that is missing library.properties file: ({})", missing_library_properties_list)

0 commit comments

Comments
 (0)