-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
cache parallel tests log on ci #10989
Merged
MikeMcQuaid
merged 10 commits into
Homebrew:master
from
hyuraku:paralell_tests_cache_on_ci
Apr 8, 2021
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0ebc90e
cache paralell tests log on ci
hyuraku 7f5a97d
change directory for log
hyuraku 603c607
change order of caching test log
hyuraku c0dc5ca
repair cache key
hyuraku 854b898
change test log path
hyuraku 7fbe08e
add a directory for test log
hyuraku 5366bc1
repair tests order
hyuraku 3c308aa
create different tests log with each options
hyuraku 9476ba2
repair cache key and add restore key
hyuraku 7f3ad67
repair restore key
hyuraku File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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 | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -201,6 +201,16 @@ jobs: | |||||||
- name: Install Bundler RubyGems | ||||||||
run: brew install-bundler-gems | ||||||||
|
||||||||
- name: Create parallel test log directory | ||||||||
run: mkdir tests | ||||||||
|
||||||||
- name: Cache parallel tests log | ||||||||
uses: actions/cache@v1 | ||||||||
with: | ||||||||
path: tests/parallel_runtime_rspec.log | ||||||||
key: ${{ runner.os }}-parallel_runtime_rspec.log | ||||||||
restore-keys: ${{ runner.os }}-parallel_runtime_rspec.log | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
- name: Run brew tests | ||||||||
run: | | ||||||||
# brew tests doesn't like world writable directories | ||||||||
|
@@ -283,6 +293,16 @@ jobs: | |||||||
which svn | ||||||||
which svnadmin | ||||||||
|
||||||||
- name: Create parallel test log directory | ||||||||
run: mkdir tests | ||||||||
|
||||||||
- name: Cache parallel tests log | ||||||||
uses: actions/cache@v1 | ||||||||
with: | ||||||||
path: tests/parallel_runtime_rspec.log | ||||||||
key: ${{ runner.os }}-parallel_runtime_rspec.log | ||||||||
MikeMcQuaid marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||
restore-keys: ${{ runner.os }}-parallel_runtime_rspec.log | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
||||||||
- name: Run brew tests | ||||||||
run: brew tests --online --coverage | ||||||||
env: | ||||||||
|
This file contains 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 | ||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -98,10 +98,17 @@ def tests | |||||||||||||||||||||||||||||||||||||||
Dir.glob("test/**/*_spec.rb") | ||||||||||||||||||||||||||||||||||||||||
end | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
parallel_rspec_log_path = if ENV["CI"] | ||||||||||||||||||||||||||||||||||||||||
"tests/parallel_runtime_rspec.log" | ||||||||||||||||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||||||||||||||||
"#{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log" | ||||||||||||||||||||||||||||||||||||||||
end | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||
parallel_args = if ENV["CI"] | ||||||||||||||||||||||||||||||||||||||||
%w[ | ||||||||||||||||||||||||||||||||||||||||
%W[ | ||||||||||||||||||||||||||||||||||||||||
--combine-stderr | ||||||||||||||||||||||||||||||||||||||||
--serialize-stdout | ||||||||||||||||||||||||||||||||||||||||
--runtime-log "#{parallel_rspec_log_path}" | ||||||||||||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||||||||||||||||
%w[ | ||||||||||||||||||||||||||||||||||||||||
|
@@ -120,7 +127,7 @@ def tests | |||||||||||||||||||||||||||||||||||||||
--require spec_helper | ||||||||||||||||||||||||||||||||||||||||
--format NoSeedProgressFormatter | ||||||||||||||||||||||||||||||||||||||||
--format ParallelTests::RSpec::RuntimeLogger | ||||||||||||||||||||||||||||||||||||||||
--out #{HOMEBREW_CACHE}/tests/parallel_runtime_rspec.log | ||||||||||||||||||||||||||||||||||||||||
--out #{parallel_rspec_log_path} | ||||||||||||||||||||||||||||||||||||||||
] | ||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||
bundle_args << "--format" << "RSpec::Github::Formatter" if ENV["GITHUB_ACTIONS"] | ||||||||||||||||||||||||||||||||||||||||
|
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.
Just noticed: probably want to include the
test-flags
in the key somehow (because otherwise the three matrix workers will overwrite each other's cache)