fix unit tests and implement CI