-
Notifications
You must be signed in to change notification settings - Fork 132
Add knapsack gem #390
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 knapsack gem #390
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! We should probably add some doc/readme later of how it works and how to use it.
knapsack_rspec_report.json
Outdated
"spec/requests/api/v1/feature_flags_spec.rb": 0.04056499999933294, | ||
"spec/policies/admin/admin_user_policy_spec.rb": 0.004445000000487198, | ||
"spec/requests/api/v1/settings_spec.rb": 0.04358700000011595 | ||
} No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New line missing
.github/workflows/ci.yml
Outdated
env: | ||
RAILS_ENV: test | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
CI_NODE_TOTAL: 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be like a variable? Because it probably won't be 1 forever.
What's the status of this PR? Please add PR description |
Hi @sebastiancaraballo. This PR is open and needs reviews to be merged on a "feature" branch release/improve-ci to configure together with parallel tests and improve CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this also work locally? Maybe it's worth adding the command on the README
knapsack_rspec_report.json
Outdated
@@ -0,0 +1,31 @@ | |||
{ | |||
"spec/requests/api/v1/passwords/edit_spec.rb": 0.18011699999988195, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this file be ignored? Just asking
.github/workflows/ci.yml
Outdated
RAILS_ENV: test | ||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} | ||
CI_NODE_TOTAL: 1 | ||
CI_NODE_INDEX: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same for this I guess?
Gemfile
Outdated
gem 'annotate', '~> 3.2', '>= 3.0.3' | ||
gem 'dotenv-rails', '~> 2.7.6' | ||
gem 'factory_bot_rails', '~> 5.1', '>= 5.1.1' | ||
gem 'knapsack', '~> 4.0.0', '>= 4.0.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gem 'knapsack', '~> 4.0.0', '>= 4.0.0' | |
gem 'knapsack', '~> 4.0' |
maybe that's better so we allow any 4.x version?
There are some logs in the CI that aren't very nice
|
Might be good to add some docs under |
d89ef1b
to
a03ac71
Compare
a03ac71
to
316918a
Compare
.github/workflows/ci.yml
Outdated
CI_NODE_TOTAL: ${{ secrets.CI_NODE_TOTAL || 1 }} | ||
CI_NODE_INDEX: ${{ secrets.CI_NODE_INDEX || 0 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this will be in secrets, it might be set with a matrix or something like that I guess
spec/spec_helper.rb
Outdated
require 'pundit/rspec' | ||
|
||
Knapsack.tracker.config(enable_time_offset_warning: false) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e5d3d29
to
8b6591e
Compare
ci_node_total: [4] | ||
# set N-1 indexes for parallel jobs | ||
# When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc | ||
ci_node_index: [0, 1, 2, 3] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great that you made it work, but for projects to start we might be good with just
ci_node_total: [4] | |
# set N-1 indexes for parallel jobs | |
# When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc | |
ci_node_index: [0, 1, 2, 3] | |
ci_node_total: [1] | |
# set N-1 indexes for parallel jobs | |
# When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc | |
ci_node_index: [0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay we'll keep in this way to continue with our work/ tests but before merging into master we'll change and also we'll add the documentation explaining how to use
Board:
Description:
This PR adds Knapsack gem and basic configuration.