Slow tests

I have a rails project, and recently migrated to GitlabCI from CircleCI, but I have an issue about the time of running rspec. Locally I get an average time of 12 to 15 minutes, when I was using CircleCI, almost every time when running on Circle rspec take 8 to 12 minutes, but now with GitlabCI, almost every time it tooks 30+ minutes (got 56 minutes in a single run once) with the same quantity of tests in the three cases.I am using shared runners I don’t know if have any relation.
Anyone have a relate problem or know how to speed up tests on GitlabCI?