File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,15 +96,25 @@ jobs:
9696
9797 - name : Install eGSIM smtk lib (Windows)
9898 if : matrix.config.os == 'windows-latest'
99+ shell : cmd
99100 run : |
100101 venv\Scripts\activate
101102 python -m pip install --upgrade pip setuptools wheel
102103 python -m pip install -r "${{ matrix.config.req-file }}"
103104 python -m pip install .
104105
105106 - name : Test eGSIM (smtk lib)
107+ if : matrix.config.os != 'windows-latest'
106108 run : |
107109 source venv/bin/activate
108110 pip install pytest
109111 pytest --ignore=./tests/tmp/ -xvvv ./tests/smtk
110112
113+ - name : Test eGSIM (smtk lib, Windows)
114+ if : matrix.config.os == 'windows-latest'
115+ shell : cmd
116+ run : |
117+ venv\Scripts\activate
118+ pip install pytest
119+ pytest --ignore=./tests/tmp/ -xvvv ./tests/smtk
120+
Original file line number Diff line number Diff line change @@ -156,28 +156,17 @@ def is_library_functions_readme_outdated():
156156 LIBRARY_FUNCTIONS_README_IS_UPDATED needs to be kept in sync with changes
157157 with smtk code
158158 """
159-
160- paths = {Path (smtk .__file__ ).resolve ().parent }
161-
162- for name , obj in vars (smtk ).items ():
163- if name .startswith ("__" ) and name .endswith ("__" ):
164- continue
165- mod_name = getattr (obj , "__module__" , None )
166- if mod_name is None :
167- continue
168- if mod_name == smtk .__name__ or mod_name .startswith (smtk .__name__ + "." ):
169- mod = inspect .getmodule (obj )
170- if mod and hasattr (mod , "__file__" ):
171- paths .add (Path (mod .__file__ ).resolve ())
159+ root = None
160+ if "GITHUB_WORKSPACE" in os .environ : # gihub workflow
161+ root = Path (os .environ ["GITHUB_WORKSPACE" ]) / 'egsim' / 'smtk'
162+ else :
163+ root = Path (smtk .__file__ ).resolve ().parent
172164
173165 newest_mtime = - 1
174- for entry in paths :
166+ for entry in root . root . rglob ( "*.py" ) :
175167 mtime = entry .stat ().st_mtime
176168 if mtime > newest_mtime :
177169 newest_mtime = mtime
178170
179- lib_func_ref_readme = (
180- Path (smtk .__file__ ).resolve ().parent .parent .parent /
181- 'LIBRARY_FUNCTIONS_REFERENCE.md'
182- )
183- return Path (lib_func_ref_readme ).stat ().st_mtime < newest_mtime
171+ lib_func_ref_readme = root .parent .parent / 'LIBRARY_FUNCTIONS_REFERENCE.md'
172+ return lib_func_ref_readme .stat ().st_mtime < newest_mtime
You can’t perform that action at this time.
0 commit comments