[workflow]New version: Create workflow files for examples' auto check (#2298)

* [workflows]bug_repair

* [workflow]new_pr_fixing_bugs

Co-authored-by: binmakeswell <binmakeswell@gmail.com>
This commit is contained in:
ziyuhuang123
2023-01-06 09:26:49 +08:00
committed by GitHub
parent d7352bef2c
commit 7080a8edb0
10 changed files with 320 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--fileNameList', type=str)
args = parser.parse_args()
name_list = args.fileNameList.split(":")
folder_need_check = set()
for loc in name_list:
# Find only the sub-folder of 'example' folder
if loc.split("/")[0] == "examples" and len(loc.split("/")) >= 4:
folder_need_check.add(loc.split("/")[1] + "/" + loc.split("/")[2])
# Output the result using print. Then the shell can get the values.
print(list(folder_need_check))
if __name__ == '__main__':
main()