Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to look at diff a different way? Like passing in files? SHA's? #101

Open
noralin opened this issue Oct 15, 2018 · 5 comments
Labels
feature request an issue that asks for a feature which is not supported yet question

Comments

@noralin
Copy link

noralin commented Oct 15, 2018

Right now you support getting diff from unstaged changes, what if we want to run all the specs in our ci? We'd need to commit our changes first. So could you provide guidance on where I would change to be able to look at diff by providing a list of files? or maybe by providing SHA's?

@pluff
Copy link
Contributor

pluff commented Oct 16, 2018

You can specify SHA's in config file https://toptal.github.io/crystalball/runner/#config-file
E.g.

# crystalball.yml
diff_from: "origin/master"
diff_to: "HEAD"

or you can set it explicitly with CRYSTALBALL_DIFF_FROM and CRYSTALBALL_DIFF_TO variables

@pluff pluff added the question label Oct 16, 2018
@noralin
Copy link
Author

noralin commented Oct 16, 2018

Thanks!! When I specify diff_from: "origin/master", it picks up specs from the gem, because one of my commit introduces this gem, is there a way to exclude them?
ex:
/vendor/cache/crystalball-bb6941984dbd/spec/logging_spec.rb is in the prediction list.

@pluff pluff added the feature request an issue that asks for a feature which is not supported yet label Oct 16, 2018
@pluff
Copy link
Contributor

pluff commented Oct 16, 2018

@noralin I guess you can use the same approach we've discussed here: #99

Also PRs are highly appreciated if you want to add support of filtering predictions.

@noralin
Copy link
Author

noralin commented Oct 16, 2018

For that one, I ended up extending Crystalball::RSpec::Runner because I wanted to be able to provide a argument on runtime to exclude/include feature specs. So basically being able to run bundle exec crystalball --exclude-feature-specs. Is that a good solution? I can do the same to filter out vendor/cache/...spec

@noralin noralin closed this as completed Dec 21, 2018
@pluff
Copy link
Contributor

pluff commented May 8, 2019

I'm reopening this one to reflect that this feature is waiting for a contributor.

@pluff pluff reopened this May 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request an issue that asks for a feature which is not supported yet question
Projects
None yet
Development

No branches or pull requests

2 participants