Synchronize shared configuration #1265
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: master | |
pull_request: | |
jobs: | |
tap_syntax: | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/homebrew/ubuntu22.04:master | |
env: | |
HOMEBREW_SIMULATE_MACOS_ON_LINUX: 1 | |
steps: | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- run: brew test-bot --only-tap-syntax | |
rspec_tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@2a18b06812b0e15bb916e1df298d3e740422c47e # v1.203.0 | |
with: | |
bundler-cache: true | |
- name: Run Homebrew/homebrew-services RSpec tests | |
run: bundle exec rspec | |
functional_tests: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
HOMEBREW_NO_INSTALL_FROM_API: 1 | |
steps: | |
- name: Enable linger | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
loginctl enable-linger "$(whoami)" | |
echo "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus" >> "$GITHUB_ENV" | |
- name: Set up Homebrew | |
id: set-up-homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@2a18b06812b0e15bb916e1df298d3e740422c47e # v1.203.0 | |
with: | |
bundler-cache: true | |
- name: Unlink services repo | |
run: | | |
rm "$(brew --repo homebrew/services)" | |
cp -a "$PWD" "$(brew --repo homebrew/services)" | |
- name: Test start command | |
run: | | |
brew install consul | |
brew services start consul | |
brew services list | grep consul | |
sleep 5 | |
consul kv get -recurse | |
- name: Test restart command | |
run: | | |
brew services stop consul | |
sleep 5 | |
brew services run consul | |
brew services restart consul | |
brew services list | grep consul | |
sleep 5 | |
consul kv get -recurse | |
- name: Test stop command | |
run: | | |
brew services stop consul | |
sleep 5 | |
brew services list | grep consul | grep none | |
- name: Test run command | |
run: | | |
brew services run consul | |
sleep 5 | |
consul kv get -recurse | |
brew services stop consul | |
- name: Test list command | |
run: | | |
brew services | grep consul | |
- name: Test info command | |
run: | | |
brew services info consul | grep consul | |
brew services info consul --verbose | grep consul | |
brew services info consul --json | ruby -e "require 'json'" -e "puts JSON.parse(ARGF.read)" | |
- name: Link services repo | |
run: | | |
rm -rf "$(brew --repo homebrew/services)" | |
ln -s "$PWD" "$(brew --repo homebrew/services)" |