| name: brew test-bot |
| on: |
| push: |
| branches: |
| - master |
| paths: |
| - '**.rb' |
| - .github/workflows/tests.yml |
| pull_request: |
| paths: |
| - '**.rb' |
| - .github/workflows/tests.yml |
| jobs: |
| test-bot: |
| 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@29b2973f18e5aca5443f4b3d87f68eda7a27b22b |
| |
| - name: Cache Homebrew Bundler RubyGems |
| id: cache |
| uses: actions/cache@56461b9eb0f8438fd15c7a9968e3c9ebb18ceff1 |
| 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 |
| if: steps.cache.outputs.cache-hit != 'true' |
| run: brew install-bundler-gems |
| |
| - run: brew test-bot --only-cleanup-before |
| |
| - run: brew test-bot --only-setup |
| |
| - run: brew test-bot --only-tap-syntax |
| |
| - run: brew test-bot --only-formulae |
| if: github.event_name == 'pull_request' |