Add the Crystalball ActionViewStrategy map generator
Context
- Crystalball is a gem we use to do Predictive Test Selection (PTS) in gitlab-org/gitlab CI/CD pipelines.
- This gem uses various strategies to do mappings from a file to the tests that should be run when that file changes.
- We have been using the Coverage Strategy for a few years, and with !147076 (merged), we recently switched to the DescribedClass strategy.
Goal
- Introduce the ActionView Strategy
Technical hints
We tentatively introduced it in !147076 (comment 1813278983), but there were some errors (test issue - failed job):
# --- Caused by: ---
# NoMethodError:
# undefined method `push' for nil:NilClass
#
# ActionViewStrategy.views.push identifier
# ^^^^^
# ./app/controllers/application_controller.rb:132:in `render'
This just happened on a few specs, and the strategy added 1973 mappings for HAML view files and others, which is pretty good!
Edited by David Dieulivol