Skip to content

warp-cli@preview 0.2025.12.10.08.12.preview_04 #114

warp-cli@preview 0.2025.12.10.08.12.preview_04

warp-cli@preview 0.2025.12.10.08.12.preview_04 #114

Workflow file for this run

name: brew test-bot
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_NO_AUTO_UPDATE: 1
jobs:
generate-matrix:
outputs:
matrix: ${{ steps.generate-matrix.outputs.matrix }}
runs-on: macos-latest
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
- name: Generate CI matrix
id: generate-matrix
env:
PULL_REQUEST_URL: ${{ github.event.pull_request.url }}
run: |
if [[ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]]; then
brew generate-cask-ci-matrix --casks warp-cli warp-cli@preview
elif [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
brew generate-cask-ci-matrix --syntax-only
elif [[ "${GITHUB_EVENT_NAME}" == "pull_request" ]]; then
brew generate-cask-ci-matrix --url "$PULL_REQUEST_URL"
else
echo "::error file=.github/workflows/tests.yml::Unsupported event ${GITHUB_EVENT_NAME}"
exit 1
fi
test:
name: ${{ matrix.name }}
needs: generate-matrix
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container || null }}
strategy:
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
permissions:
actions: read
checks: read
contents: read
pull-requests: read
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Clean up CI machine
run: brew test-bot --only-cleanup-before
- name: Cache Homebrew Bundler RubyGems
uses: actions/cache@v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ matrix.runner }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ matrix.runner }}-rubygems-
- name: Cache style cache
if: runner.os == 'macOS'
uses: actions/cache@v4
with:
path: ~/Library/Caches/Homebrew/style
key: macos-style-cache-${{ github.sha }}
restore-keys: macos-style-cache-
- run: brew test-bot --only-setup
- name: Check tap syntax
run: brew test-bot --tap '${{ matrix.tap }}' --only-tap-syntax
id: tap-syntax
if: always() && !matrix.cask
- name: Run brew fetch --cask ${{ matrix.cask.token }}
id: fetch
run: brew fetch --cask --retry --force ${{ join(matrix.fetch_args, ' ') }} '${{ matrix.cask.path }}'
if: always() && matrix.cask
- name: Run brew audit --cask${{ (matrix.cask && ' ') || ' --tap ' }}${{ matrix.cask.token || matrix.tap }}
id: audit
run: brew audit --cask ${{ join(matrix.audit_args, ' ') }}${{ (matrix.cask && ' ') || '--tap ' }}'${{ matrix.cask.token || matrix.tap }}'
if: >
always() &&
contains(fromJSON('["success", "skipped"]'), steps.tap-syntax.outcome) &&
(!matrix.cask || steps.fetch.outcome == 'success') &&
!matrix.skip_audit
- name: Run brew uninstall --cask --force --zap ${{ matrix.cask.path }}
run: brew uninstall --cask --force --zap '${{ matrix.cask.token }}'
if: always() && matrix.cask
- name: Run brew install --cask ${{ matrix.cask.token }}
id: install
run: brew install --cask '${{ matrix.cask.path }}'
if: always() && matrix.cask && !matrix.skip_install
- name: Run brew uninstall --cask ${{ matrix.cask.token }}
run: brew uninstall --cask '${{ matrix.cask.path }}'
if: always() && steps.install.outcome == 'success'
# This job aggregates the results of all the different checks in the CI matrix, regardless of which
# ones a particular PR needs.
aggregate-results:
name: aggregate-results
needs: test
runs-on: ubuntu-latest
if: always()
steps:
- name: Check test results
run: ${{ needs.test.result == 'success' }}