Skip to content
Snippets Groups Projects
Unverified Commit 4d00a7bf authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

Merge pull request #7037 from issyl0/tap-new-github-actions-ci

dev-cmd/tap-new: Set up GitHub Actions CI instead of Azure
parents a8ced115 b3abf3d7
No related branches found
No related tags found
No related merge requests found
......@@ -51,24 +51,31 @@ module Homebrew
MARKDOWN
write_path(tap, "README.md", readme)
azure = <<~YAML
actions = <<~YAML
name: brew test-bot
on:
push:
branches: master
pull_request: []
jobs:
- job: macOS
pool:
vmImage: macOS-10.14
steps:
- bash: |
set -e
sudo xcode-select --switch /Applications/Xcode_10.2.1.app/Contents/Developer
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
displayName: Run brew test-bot
test-bot:
runs-on: macos-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Run brew test-bot
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
YAML
write_path(tap, "azure-pipelines.yml", azure)
(tap.path/".github/workflows").mkpath
write_path(tap, ".github/workflows/main.yml", actions)
ohai "Created #{tap}"
puts tap.path.to_s
end
......
......@@ -7,12 +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" 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
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment