File tree Expand file tree Collapse file tree 3 files changed +50
-41
lines changed Expand file tree Collapse file tree 3 files changed +50
-41
lines changed Original file line number Diff line number Diff line change 1+ # Copyright 2023 Ericsson AB
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+
15+ import os
16+ import json
17+ import sys
18+ import glob
19+
20+
21+ IGNORED_FOLDER_LIST = [
22+ "templates" ,
23+ "__pycache__" ,
24+ ".pytest_cache" ,
25+ ]
26+
27+ def main ():
28+ projects_dir = os .getenv ("PROJECTS_DIR" )
29+ if not projects_dir :
30+ print ("[ERROR] PROJECTS_DIR not set!" , file = sys .stderr )
31+ sys .exit (1 )
32+
33+ project_list = []
34+
35+ for project_folder in glob .glob (os .path .join (projects_dir , "*/" )):
36+ project_name = os .path .basename (os .path .normpath (project_folder ))
37+
38+ if project_name not in IGNORED_FOLDER_LIST :
39+ project_list .append (
40+ {"name" : project_name , "folder" : project_folder }
41+ )
42+
43+ final_matrix_json = json .dumps (project_list )
44+
45+ print (f"matrix_json={ final_matrix_json } " )
46+
47+
48+ if __name__ == "__main__" :
49+ main ()
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4444 env :
4545 PROJECTS_DIR : " ./test/foss/"
4646 run : |
47- ./.github/foss_project_collector.sh >> "$GITHUB_OUTPUT"
47+ python3 ./.github/foss_project_collector.py >> "$GITHUB_OUTPUT"
4848 shell : bash
4949
5050 # TODO: Add script to run tests locally
You can’t perform that action at this time.
0 commit comments