Skip to content

Commit d89b406

Browse files
committed
Import test-bot action provided by homebrew's template
1 parent 63b23e1 commit d89b406

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: brew test-bot
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
test-bot:
11+
strategy:
12+
matrix:
13+
os: [ ubuntu-22.04, macos-13, macos-15 ]
14+
runs-on: ${{ matrix.os }}
15+
permissions:
16+
actions: read
17+
checks: read
18+
contents: read
19+
pull-requests: read
20+
steps:
21+
- name: Set up Homebrew
22+
id: set-up-homebrew
23+
uses: Homebrew/actions/setup-homebrew@master
24+
with:
25+
token: ${{ github.token }}
26+
27+
- name: Cache Homebrew Bundler RubyGems
28+
uses: actions/cache@v4
29+
with:
30+
path: ${{ steps.set-up-homebrew.outputs.gems-path }}
31+
key: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }}
32+
restore-keys: ${{ matrix.os }}-rubygems-
33+
34+
- run: brew test-bot --only-cleanup-before
35+
36+
- run: brew test-bot --only-setup
37+
38+
- run: brew test-bot --only-tap-syntax
39+
- run: brew test-bot --only-formulae
40+
if: github.event_name == 'pull_request'
41+
42+
- name: Upload bottles as artifact
43+
if: always() && github.event_name == 'pull_request'
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: bottles_${{ matrix.os }}
47+
path: '*.bottle.*'

0 commit comments

Comments
 (0)