Only run Ruby unit tests for backend-only changes
What is the current behavior?
The whole test suite is run even if only frontend code is changed. See for example
- diff: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/21868/diffs
- pipeline: https://gitlab.com/andrealeone/gitlab-ce/pipelines/30939778
What is the expected behavior?
We only run the relevant tests for frontend changes—namely Karma tests and feature tests. This significantly reduces the number of RSpec tests that are run unnecessarily.
$ find spec -name '*_spec.rb' | wc -l
2687
$ find spec/features -name '*_spec.rb' | wc -l
537
Edited by Rémy Coutable