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

Make build script more readable #227

Open
benoittgt opened this issue Dec 22, 2019 · 2 comments
Open

Make build script more readable #227

benoittgt opened this issue Dec 22, 2019 · 2 comments

Comments

@benoittgt
Copy link
Member

Hello

As mentioned in this comment : rspec/rspec-rails#2231 (comment)

I would love to be able to more easily run the build locally, and run each step without looking at shell functions or Rakefile. Like simply copy paste one line from travis logs.

I have often problems to replay a failing step especially on rspec-rails. Most of the time I open the Travis build's log, try to rerun the step, if I am not able to reproduce the error, I rerun previous or parent task, then if I'm still not able to reproduce the error, I try to be as close as possible to the CI environment.

  1. Does CI build steps are clear enough?

I think we should improve the command that are executed. Maybe with some visual space, ascii separator. We should be able to easily see all commands that are executed by the CI with the relative path. I am thinking about tasks in "example app" in rspec-rails that does not mention the path where they are executed.

  1. How to more easily reproduce the step?

Should we provide when the command fail, the full command to rerun locally the step? For example:

🚧 Build failed at step "bundle exec rake smoke:app". To rerun the step:

rvm use 2.6 && rm -f Gemfile.lock && export RAILS_VERSION='~>6.0' && bundle --binstubs && bundle exec rake smoke:app

Maybe a bash script that would choose ruby via rvm setup, check binstubs then run a specific commands like above. Something like:

🚧 Build failed at step "bundle exec rake smoke:app". To rerun the step:

script/local_retry --ruby_version='2.6' --command='bundle exec rake smoke:app'`

I looked at Github actions, to see if it was more readable. It is a little bit better to display step, but not executed commands. https://github.com/dry-rb/dry-effects/runs/358219156

@JonRowe
Copy link
Member

JonRowe commented Dec 22, 2019

So the problem is not our CI host, the problem is our build consists of various chunks which are a combination of bash scripts and rake tasks which generate apps and run tasks that are not easily replicated. I think focusing on making those more replicatable will help.

@benoittgt
Copy link
Member Author

I think the way rspec-rails 4 goes is the way that will help us for other rspec gems. Having a smaller build matrix is a game changer.

I don't see at the moment the gain of using Github action instead of Travis CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants