move test actions from bash to python