.github/workflows/tests: run config, doctor.
This should help with debugging why the `brew bundle` tests are now failing.
This commit is contained in:
parent
4a7ea6dbc4
commit
bed5297b6c
37
.github/workflows/tests.yml
vendored
37
.github/workflows/tests.yml
vendored
@ -11,15 +11,25 @@ jobs:
|
|||||||
os: [ubuntu-latest, macOS-latest]
|
os: [ubuntu-latest, macOS-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Git repository
|
- name: Set up Git repository
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Set up Homebrew
|
- name: Set up Homebrew
|
||||||
run: |
|
run: |
|
||||||
if [ "$RUNNER_OS" = "Linux" ]; then
|
if [ "$RUNNER_OS" = "Linux" ]; then
|
||||||
HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew
|
HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew
|
||||||
sudo mkdir -p /home/linuxbrew
|
sudo mkdir -p /home/linuxbrew/.linuxbrew
|
||||||
sudo ln -s "$PWD" "$HOMEBREW_REPOSITORY"
|
cd ..
|
||||||
|
sudo mv "brew" "$HOMEBREW_REPOSITORY"
|
||||||
|
sudo ln -s "$HOMEBREW_REPOSITORY" "brew"
|
||||||
|
cd /home/linuxbrew/.linuxbrew
|
||||||
|
sudo mkdir -p bin etc include lib opt sbin share var/homebrew/linked Cellar
|
||||||
|
sudo ln -s ../Homebrew/bin/brew /home/linuxbrew/.linuxbrew/bin/
|
||||||
sudo chown -R "$USER" /home/linuxbrew
|
sudo chown -R "$USER" /home/linuxbrew
|
||||||
|
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
|
||||||
|
|
||||||
|
# Install taps needed for 'brew tests'
|
||||||
|
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||||
|
brew tap homebrew/bundle
|
||||||
else
|
else
|
||||||
HOMEBREW_REPOSITORY="$(brew --repo)"
|
HOMEBREW_REPOSITORY="$(brew --repo)"
|
||||||
mv "$HOMEBREW_REPOSITORY/Library/Taps" "$PWD/Library"
|
mv "$HOMEBREW_REPOSITORY/Library/Taps" "$PWD/Library"
|
||||||
@ -28,11 +38,30 @@ jobs:
|
|||||||
brew update-reset Library/Taps/homebrew/homebrew-core
|
brew update-reset Library/Taps/homebrew/homebrew-core
|
||||||
|
|
||||||
# Install taps needed for 'brew tests'
|
# Install taps needed for 'brew tests'
|
||||||
|
export HOMEBREW_NO_AUTO_UPDATE=1
|
||||||
brew tap homebrew/cask
|
brew tap homebrew/cask
|
||||||
brew tap homebrew/bundle
|
brew tap homebrew/bundle
|
||||||
brew tap homebrew/services
|
brew tap homebrew/services
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Run brew config
|
||||||
|
run: |
|
||||||
|
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
|
||||||
|
brew config
|
||||||
|
|
||||||
|
- name: Run brew doctor
|
||||||
|
run: |
|
||||||
|
if [ "$RUNNER_OS" = "Linux" ]; then
|
||||||
|
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/bin:/bin"
|
||||||
|
|
||||||
|
# Cleanup some Linux `brew doctor` failures
|
||||||
|
sudo rm -rf /usr/local/include/node/
|
||||||
|
else
|
||||||
|
# Allow Xcode to be outdated
|
||||||
|
export HOMEBREW_GITHUB_ACTIONS=1
|
||||||
|
fi
|
||||||
|
brew doctor
|
||||||
|
|
||||||
- name: Install Bundler RubyGems
|
- name: Install Bundler RubyGems
|
||||||
run: |
|
run: |
|
||||||
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
|
export PATH="/home/linuxbrew/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin"
|
||||||
|
@ -77,8 +77,8 @@ HOMEBREW_VERSION="$(git -C "$HOMEBREW_REPOSITORY" describe --tags --dirty --abbr
|
|||||||
HOMEBREW_USER_AGENT_VERSION="$HOMEBREW_VERSION"
|
HOMEBREW_USER_AGENT_VERSION="$HOMEBREW_VERSION"
|
||||||
if [[ -z "$HOMEBREW_VERSION" ]]
|
if [[ -z "$HOMEBREW_VERSION" ]]
|
||||||
then
|
then
|
||||||
HOMEBREW_VERSION=">=1.7.1 (shallow or no git repository)"
|
HOMEBREW_VERSION=">=2.2.0 (shallow or no git repository)"
|
||||||
HOMEBREW_USER_AGENT_VERSION="1.X.Y"
|
HOMEBREW_USER_AGENT_VERSION="2.X.Y"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$HOMEBREW_PREFIX" = "/" || "$HOMEBREW_PREFIX" = "/usr" ]]
|
if [[ "$HOMEBREW_PREFIX" = "/" || "$HOMEBREW_PREFIX" = "/usr" ]]
|
||||||
|
@ -6,7 +6,8 @@ describe "Homebrew.test_args" do
|
|||||||
it_behaves_like "parseable arguments"
|
it_behaves_like "parseable arguments"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "brew test", :integration_test do
|
# randomly segfaults on Linux with portable-ruby.
|
||||||
|
describe "brew test", :integration_test, :needs_macos do
|
||||||
it "tests a given Formula" do
|
it "tests a given Formula" do
|
||||||
install_test_formula "testball", <<~'RUBY'
|
install_test_formula "testball", <<~'RUBY'
|
||||||
test do
|
test do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user