https://stackoverflow.com/q/32933174
https://github.com/firecow/gitlab-ci-local
(I only tried it shortly many months ago before running into some issues, it probably works better now)