mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
tap-new: update GitHub Actions.
This should be using the split options for a better user experience and can use both Linux and macOS now.
This commit is contained in:
parent
9f80629f64
commit
acfdbce6d4
@ -53,23 +53,37 @@ module Homebrew
|
||||
pull_request: []
|
||||
jobs:
|
||||
test-bot:
|
||||
runs-on: macos-latest
|
||||
runs-on: [ubuntu-latest, macos-latest]
|
||||
steps:
|
||||
- name: Update Homebrew
|
||||
run: brew update
|
||||
|
||||
- name: Set up Git repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Run brew test-bot
|
||||
|
||||
- name: Set up Homebrew
|
||||
run: |
|
||||
set -e
|
||||
brew update
|
||||
HOMEBREW_TAP_DIR="/usr/local/Homebrew/Library/Taps/#{tap.full_name}"
|
||||
mkdir -p "$HOMEBREW_TAP_DIR"
|
||||
rm -rf "$HOMEBREW_TAP_DIR"
|
||||
ln -s "$PWD" "$HOMEBREW_TAP_DIR"
|
||||
brew test-bot
|
||||
|
||||
- name: Run brew test-bot --only-cleanup-before
|
||||
run: brew test-bot --only-cleanup-before
|
||||
|
||||
- name: Run brew test-bot --only-setup
|
||||
run: brew test-bot --only-setup
|
||||
|
||||
- name: Run brew test-bot --only-tap-syntax
|
||||
run: brew test-bot --only-tap-syntax
|
||||
|
||||
- name: Run brew test-bot --only-formulae
|
||||
if: github.event_name == 'pull_request'
|
||||
run: brew test-bot --only-formulae
|
||||
YAML
|
||||
|
||||
(tap.path/".github/workflows").mkpath
|
||||
write_path(tap, ".github/workflows/main.yml", actions)
|
||||
write_path(tap, ".github/workflows/tests.yml", actions)
|
||||
ohai "Created #{tap}"
|
||||
puts tap.path.to_s
|
||||
end
|
||||
|
@ -7,13 +7,13 @@ describe "Homebrew.tap_new_args" do
|
||||
end
|
||||
|
||||
describe "brew tap-new", :integration_test do
|
||||
it "initializes a new Tap with a ReadMe file and GitHub Actions CI" do
|
||||
it "initializes a new tap with a README file and GitHub Actions CI" do
|
||||
expect { brew "tap-new", "homebrew/foo", "--verbose" }
|
||||
.to be_a_success
|
||||
.and output(%r{homebrew/foo}).to_stdout
|
||||
.and not_to_output.to_stderr
|
||||
|
||||
expect(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/README.md").to exist
|
||||
expect(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/.github/workflows/main.yml").to exist
|
||||
expect(HOMEBREW_LIBRARY/"Taps/homebrew/homebrew-foo/.github/workflows/tests.yml").to exist
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user