-
Notifications
You must be signed in to change notification settings - Fork 6
(DevEx): Add knapsack pro tests and exclude initialize #1007
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e4fca3a
WIP
TylerJang27 3127696
try with logger
TylerJang27 41b66ef
more print
TylerJang27 f664cd2
one more
TylerJang27 c434f2c
queue mode
TylerJang27 78d2f49
reset me!
TylerJang27 9f17534
refinement
TylerJang27 c62d915
cleanup
TylerJang27 1a872e1
cleanup gemfile edits
TylerJang27 01ed5de
almost there
TylerJang27 26d0395
final test before cleanup
TylerJang27 40c7723
one more fix
TylerJang27 d06b61b
final final
TylerJang27 0450c16
cleanup
TylerJang27 d62c9f5
ensure execution
TylerJang27 17d91b0
simplify?
TylerJang27 41608e8
specify tests
TylerJang27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| # Running Ruby Tests Locally | ||
|
|
||
| If you want to locally run the ruby smoke tests that are run in CI, run: | ||
|
|
||
| From `cd rspec-trunk-flaky-tests`: | ||
|
|
||
| 1. `cd rspec-trunk-flaky-tests` | ||
| 2. `bundle install` | ||
| 3. `bundle exec rake build` | ||
| 4. `cd ../.github/actions/test_ruby_gem_uploads` | ||
| 5. Verify [Gemfile](./Gemfile) points to the built gem, i.e. `gem 'rspec_trunk_flaky_tests', :path => '../../../rspec-trunk-flaky-tests'` | ||
| 6. Run `bundle exec rspec spec/variant_quarantine_spec.rb --format documentation` | ||
|
|
||
| After `cd .github/actions/test_ruby_gem_uploads` | ||
|
|
||
| See more in the [rspec README.md](../../../rspec-trunk-flaky-tests/README.md). | ||
|
|
||
| ## Knapsack Pro | ||
|
|
||
| Repeat steps 1-5 above, and run: | ||
|
|
||
| ```bash | ||
| export KNAPSACK_PRO_CI_NODE_BUILD_ID=$(openssl rand -base64 32) | ||
| export KNAPSACK_PRO_TEST_DIR=spec | ||
| export KNAPSACK_PRO_TEST_FILE_PATTERN="**/*.rb" | ||
| export KNAPSACK_PRO_PROJECT_DIR=. | ||
| export KNAPSACK_PRO_REPOSITORY_ADAPTER=git | ||
| export KNAPSACK_PRO_LOG_LEVEL=debug | ||
| export KNAPSACK_PRO_TEST_SUITE_TOKEN_RSPEC="<api-key>" | ||
| export KNAPSACK_PRO_CI_NODE_TOTAL=1 | ||
| export KNAPSACK_PRO_CI_NODE_INDEX=0 | ||
| export KNAPSACK_PRO_FIXED_QUEUE_SPLIT=false | ||
|
|
||
| bundle exec rake "knapsack_pro:queue:rspec:initialize" | ||
| bundle exec rake "knapsack_pro:queue:rspec" | ||
| ``` | ||
|
|
||
| ### Reference | ||
|
|
||
| - [More information about Queue Mode](https://docs.knapsackpro.com/ruby/queue-mode/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| require 'rake/testtask' | ||
| require 'rake/extensiontask' | ||
| require 'knapsack_pro' | ||
| require 'rspec/core/rake_task' | ||
| KnapsackPro.load_tasks if defined?(KnapsackPro) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 acknowledge this type of assertion is brittle. I don't have a better alternative at the moment without exposing more output information from the impl itself. Imo this is fine for now, and the DevEx story is now sane enough that we can revisit when we do have more time and ideas