mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-12-26 14:02:57 +00:00
[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:
19
.github/workflows/scripts/changed_example.py
vendored
Normal file
19
.github/workflows/scripts/changed_example.py
vendored
Normal 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()
|
||||
Reference in New Issue
Block a user