Skip to content

Commit a6491b5

Browse files
committed
ci: run import_profile without nox templates
1 parent 42dd64a commit a6491b5

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

ci/run_single_test.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,29 @@ case ${TEST_TYPE} in
105105
;;
106106
esac
107107
;;
108+
import_profile)
109+
python -m pip install .
110+
PKG_NAME=$(python setup.py --name)
111+
MODULE=$(python -c "
112+
import sys, importlib.util
113+
pkg = '${PKG_NAME}'
114+
candidates = [
115+
pkg.replace('-', '.'),
116+
'.'.join(pkg.split('-')[:-1]) + '_' + pkg.split('-')[-1] if '-' in pkg else pkg,
117+
pkg.replace('-', '_')
118+
]
119+
for mod in candidates:
120+
try:
121+
if importlib.util.find_spec(mod):
122+
print(mod)
123+
sys.exit(0)
124+
except Exception:
125+
pass
126+
print(candidates[0])
127+
")
128+
python ${PROJECT_ROOT}/scripts/import_profiler/profiler.py --module "${MODULE}" --iterations 10
129+
retval=$?
130+
;;
108131
*)
109132
nox -s ${TEST_TYPE}
110133
retval=$?

0 commit comments

Comments
 (0)