Files
homebrew-tap/.github/workflows/ci.yml

62 lines
1.6 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@main
- name: Cache Homebrew Bundler RubyGems
uses: actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: bottles_${{ matrix.os }}
path: "*.bottle.*"