-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (62 loc) · 2.12 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Formula
on:
- push
jobs:
test:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
formula:
- mkr
- mackerel-agent
steps:
# https://github.com/Homebrew/actions/tree/master/setup-homebrew
# This will clone this repo into $(brew --repo "$GITHUB_REPOSITORY")
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew Bundler RubyGems
id: cache
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 the Formula
run: brew install ${{ github.repository }}/${{ matrix.formula }}
shell: bash
- name: Test the Formula
run: brew test ${{ github.repository }}/${{ matrix.formula }}
shell: bash
test-HEAD:
name: test (HEAD)
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
formula:
- mkr
- mackerel-agent
steps:
# https://github.com/Homebrew/actions/tree/master/setup-homebrew
# This will clone this repo into $(brew --repo "$GITHUB_REPOSITORY")
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Cache Homebrew Bundler RubyGems
id: cache
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-
# there may be go@1.x installed and it conflicts with go
- name: Preinstall go
run: brew install go || brew link --overwrite go
- name: Install the Formula with --HEAD
run: brew install --HEAD ${{ github.repository }}/${{ matrix.formula }}
shell: bash
- name: Test the Formula
run: brew test ${{ github.repository }}/${{ matrix.formula }}
shell: bash