-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from logchange/test-workflow
Created test workflow
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: brew test-bot | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
test-bot: | ||
name: Test formula on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories | ||
os: [ubuntu-latest, macos-13, macos-latest] | ||
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: ${{ matrix.os }}-rubygems-${{ steps.set-up-homebrew.outputs.gems-hash }} | ||
restore-keys: ${{ matrix.os }}-rubygems- | ||
|
||
- 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' | ||
|
||
- name: Install latest version of formula | ||
run: brew install logchange/tap/logchange | ||
|
||
- name: Run formula tests | ||
run: brew test logchange/tap/logchange | ||
|
||
- name: Upload bottles as artifact | ||
if: always() && github.event_name == 'pull_request' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: bottles_${{ matrix.os }} | ||
path: '*.bottle.*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters