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

Add rake task for style and tests #167

Closed
wants to merge 1 commit into from
Closed

Conversation

rahul2240
Copy link
Member

Instead of remembering all the commands it would be nice to have rake task to run tests and style checkers
closes #164

@rahul2240 rahul2240 force-pushed the rake branch 3 times, most recently from 58f3306 to 0763d36 Compare February 16, 2018 18:45
@Ana06
Copy link
Member

Ana06 commented Feb 17, 2018

@rahul2240 there is quite a lot of PRs in Trollolo at the moment, so it may take some days until I have time to review this. 😉

Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahul2240 thanks for your PR. 💐 I think you misunderstood the issue. It is about having a single task that run what is run in Travis 😉

Rakefile Outdated
@@ -10,3 +10,20 @@ namespace :gem do
system 'gem build trollolo.gemspec'
end
end

# rake task for rspec and rubocop
# rake -T (for rake tasks)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this comment needed here? 😕

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove it.


task default: %i[rubocop spec]

desc 'Run tests'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahul2240 the issue is about creating a single rake task that run both the tests and rubocop. 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ana06 using rake will do both the tasks (test,style check) if there is some offence then only it will not complete.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahul2240 what do you mean with using rake? what command would you run?

Copy link
Member Author

@rahul2240 rahul2240 Feb 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ana06 I am using only "rake" as a command and it is doing both the task i.e testing as well as style checking.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahul2240 and what happens if we add another unrelated rake task in the future?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ana06 Right now test and style check is set as default for rake command if unrelated rake task is added in future then we will have to use (rake taskname) to run it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ana06 If I am doing it wrong please let me know I am ready to start again 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rahul2240 if we add a task in the future you will have to run rake taskname and then you can not run both things at the same time. We want a single rake task, not two, that runs everything that Travis run.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ana06 Ok now I got it. Cann't we add that task to default? so that it runs automatically with rake command, Or we need a more simpler method?

Rakefile Outdated

desc 'Run rubocop'
task :rubocop do
RuboCop::RakeTask.new
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not including the same options documented in the contributing guide and used in Travis. It should be the same.

@rahul2240 rahul2240 force-pushed the rake branch 2 times, most recently from 031f872 to 4de2f5f Compare February 20, 2018 17:15
Instead of remembering all the commands it would be nice to have rake task to run tests and style checkers
closes openSUSE#164
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not add them to the default. As already said we want a single rake task, that runs everything that Travis run.

@Ana06
Copy link
Member

Ana06 commented Mar 1, 2018

@rahul2240 what is the state of this? do you need help?

@rahul2240
Copy link
Member Author

@Ana06 I am searching for the solution, give me some more time please.

@rahul2240
Copy link
Member Author

rahul2240 commented Mar 2, 2018

@Ana06 We can use namespace and add all the rake task there or in my code instead of adding it to default we can name it as "check" so that (rake check) command will run all the test.If this is not what you want then please I need your help.

@Ana06
Copy link
Member

Ana06 commented Mar 9, 2018

@rahul2240 what about doing it how I suggested already? We want a single rake task that runs everything that Travis run. 😉 The namespace would also work, but you don't need to complicate that much 😄

@Ana06
Copy link
Member

Ana06 commented Apr 5, 2018

@rahul2240 do you need help to implement the requested changes? Do you need that I clarify something? 😃

@rahul2240
Copy link
Member Author

@Ana06 Travis runs 2 tasks i.e 'bundle exec rubocop -D' & 'bundle exec rspec spec/unit' so what you want is in .rakefile i remove the rake tasks and target travis.yml to run those tasks locally with a single command?

@rahul2240 rahul2240 closed this Apr 26, 2018
@rahul2240 rahul2240 deleted the rake branch March 27, 2019 14:17
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

Successfully merging this pull request may close these issues.

Rake task for test
2 participants