And for gitlab pipelines:
Unfortunately, it only supports running single jobs. More complex tasks that requires dependencies, variables, job creation context (MR, Trigger, Web, etc.) can't be tested.
Then maybe this?
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)