Files
homebrew-tap/.github/workflows/ci.yml
2025-09-21 23:31:15 +03:00

62 lines
1.5 KiB
YAML

---
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: read-all
jobs:
test-bot:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-14]
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: write
actions: read
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew Bundler RubyGems
uses: actions/cache@v4
with:
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
key: ${{ runner.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
restore-keys: ${{ runner.os }}-rubygems-
- name: Install Homebrew Bundler RubyGems
run: brew install-bundler-gems
- name: Run brew test-bot (cleanup)
run: brew test-bot --only-cleanup-before
- name: Run brew test-bot (setup)
run: brew test-bot --only-setup
- name: Run brew test-bot (tap syntax)
run: brew test-bot --only-tap-syntax
- name: Run brew test-bot (formulae)
if: github.event_name == 'pull_request'
run: brew test-bot --only-formulae
- name: Upload bottles as artifact
if: always() && github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: bottles_${{ matrix.os }}
path: "*.bottle.*"