Fix BuildPulse handling
- be more verbose with output to be clear when we're using/submitting to BuildPulse - remove the duplicate BuildPulse submission step
This commit is contained in:
parent
1680ddb267
commit
d490e2a9a7
11
.github/workflows/tests.yml
vendored
11
.github/workflows/tests.yml
vendored
@ -333,14 +333,3 @@ jobs:
|
|||||||
- run: brew test-bot --only-formulae --test-default-formula
|
- run: brew test-bot --only-formulae --test-default-formula
|
||||||
|
|
||||||
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192
|
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192
|
||||||
|
|
||||||
- name: Upload test results to BuildPulse for flaky test detection
|
|
||||||
# Only run this step for non-PR pushes or PRs where where we have access to secrets.
|
|
||||||
# Run this step even when the tests fail. Skip if the workflow is cancelled.
|
|
||||||
if: (github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository) && !cancelled()
|
|
||||||
env:
|
|
||||||
BUILDPULSE_ACCESS_KEY_ID: ${{ secrets.BUILDPULSE_ACCESS_KEY_ID }}
|
|
||||||
BUILDPULSE_SECRET_ACCESS_KEY: ${{ secrets.BUILDPULSE_SECRET_ACCESS_KEY }}
|
|
||||||
run: |
|
|
||||||
brew install buildpulse-test-reporter
|
|
||||||
buildpulse-test-reporter submit Library/Homebrew/test/junit --account-id 1503512 --repository-id 53238813
|
|
||||||
|
|||||||
@ -50,14 +50,18 @@ module Homebrew
|
|||||||
|
|
||||||
unless Formula["buildpulse-test-reporter"].any_version_installed?
|
unless Formula["buildpulse-test-reporter"].any_version_installed?
|
||||||
ohai "Installing `buildpulse-test-reporter` for reporting test flakiness..."
|
ohai "Installing `buildpulse-test-reporter` for reporting test flakiness..."
|
||||||
|
with_env(HOMEBREW_NO_AUTO_UPDATE: "1", HOMEBREW_NO_BOOTSNAP: "1") do
|
||||||
safe_system HOMEBREW_BREW_FILE, "install", "buildpulse-test-reporter"
|
safe_system HOMEBREW_BREW_FILE, "install", "buildpulse-test-reporter"
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
ENV["BUILDPULSE_ACCESS_KEY_ID"] = ENV["HOMEBREW_BUILDPULSE_ACCESS_KEY_ID"]
|
ENV["BUILDPULSE_ACCESS_KEY_ID"] = ENV["HOMEBREW_BUILDPULSE_ACCESS_KEY_ID"]
|
||||||
ENV["BUILDPULSE_SECRET_ACCESS_KEY"] = ENV["HOMEBREW_BUILDPULSE_SECRET_ACCESS_KEY"]
|
ENV["BUILDPULSE_SECRET_ACCESS_KEY"] = ENV["HOMEBREW_BUILDPULSE_SECRET_ACCESS_KEY"]
|
||||||
|
|
||||||
|
ohai "Sending test results to BuildPulse"
|
||||||
|
|
||||||
safe_system Formula["buildpulse-test-reporter"].opt_bin/"buildpulse-test-reporter",
|
safe_system Formula["buildpulse-test-reporter"].opt_bin/"buildpulse-test-reporter",
|
||||||
"submit", "Library/Homebrew/test/junit",
|
"submit", "#{HOMEBREW_LIBRARY_PATH}/test/junit",
|
||||||
"--account-id", ENV["HOMEBREW_BUILDPULSE_ACCOUNT_ID"],
|
"--account-id", ENV["HOMEBREW_BUILDPULSE_ACCOUNT_ID"],
|
||||||
"--repository-id", ENV["HOMEBREW_BUILDPULSE_REPOSITORY_ID"]
|
"--repository-id", ENV["HOMEBREW_BUILDPULSE_REPOSITORY_ID"]
|
||||||
end
|
end
|
||||||
@ -182,7 +186,10 @@ module Homebrew
|
|||||||
|
|
||||||
# Submit test flakiness information using BuildPulse
|
# Submit test flakiness information using BuildPulse
|
||||||
# BUILDPULSE used in spec_helper.rb
|
# BUILDPULSE used in spec_helper.rb
|
||||||
ENV["BUILDPULSE"] = "1" if use_buildpulse?
|
if use_buildpulse?
|
||||||
|
ENV["BUILDPULSE"] = "1"
|
||||||
|
ohai "Running tests with BuildPulse-friendly settings"
|
||||||
|
end
|
||||||
|
|
||||||
if parallel
|
if parallel
|
||||||
system "bundle", "exec", "parallel_rspec", *parallel_args, "--", *bundle_args, "--", *files
|
system "bundle", "exec", "parallel_rspec", *parallel_args, "--", *bundle_args, "--", *files
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user