Skip to content

Commit e642093

Browse files
committed
Add brew bundle and brew services integration tests
We've had a few regressions in `brew bundle` and `brew services` recently that would have been caught by actual integration tests. This is similar to the "default formula" jobs but we want to run outside of those containers so we can run e.g. systemd. This will avoid bloating the runtime of already longer-running jobs.
1 parent 334bf23 commit e642093

File tree

2 files changed

+50
-3
lines changed

2 files changed

+50
-3
lines changed

.github/workflows/actionlint.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ name: actionlint
22

33
on:
44
push:
5-
paths:
6-
- '.github/workflows/*.ya?ml'
7-
- '.github/actionlint.yaml'
5+
branches:
6+
- master
87
pull_request:
98
paths:
109
- '.github/workflows/*.ya?ml'

.github/workflows/tests.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,54 @@ jobs:
398398

399399
- run: brew test-bot --only-formulae --only-json-tab --test-default-formula
400400

401+
test-brew-bundle-services:
402+
name: ${{ matrix.name }}
403+
needs: syntax
404+
if: github.repository_owner == 'Homebrew' && github.event_name != 'push'
405+
runs-on: ${{ matrix.runs-on }}
406+
strategy:
407+
matrix:
408+
include:
409+
- name: test brew bundle and brew services (Ubuntu)
410+
runs-on: ubuntu-latest
411+
- name: test brew bundle and brew services (macOS)
412+
runs-on: macos-15
413+
steps:
414+
- name: Set up Homebrew
415+
id: set-up-homebrew
416+
uses: Homebrew/actions/setup-homebrew@master
417+
with:
418+
core: true
419+
cask: false
420+
test-bot: false
421+
422+
- run: brew test-bot --only-cleanup-before
423+
424+
- run: brew test-bot --only-setup
425+
426+
- name: Run brew bundle and brew services integration tests
427+
run: |
428+
cat <<EOS >> Brewfile
429+
brew "git"
430+
brew "memcached", restart_service: true
431+
brew "postgresql@15", restart_service: true
432+
cask "1password"
433+
cask "1password-cli"
434+
cask "google-chrome"
435+
# VSCode cask is not available on Linux.
436+
vscode "github.copilot" if OS.mac?
437+
EOS
438+
439+
brew bundle check && exit 1
440+
brew bundle check --verbose && exit 1
441+
brew bundle list
442+
brew bundle --verbose
443+
brew services list
444+
brew bundle env | grep PATH | grep git
445+
brew bundle env --install
446+
brew bundle exec --services true
447+
brew services list
448+
401449
test-analytics:
402450
runs-on: ${{ matrix.os }}
403451
strategy:

0 commit comments

Comments
 (0)