Merge pull request #74 from Mirantis/remove-k0sctl-dependency #140
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
name: brew test-bot | |
on: | |
workflow_dispatch: | |
inputs: | |
checkout_ref: | |
description: 'Ref to checkout' | |
required: true | |
type: string | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [ "opened", "reopened", "synchronize", "ready_for_review" ] | |
branches: [ "main" ] | |
jobs: | |
test-bot: | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-13, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
if: inputs.checkout_ref != '' | |
with: | |
ref: ${{ inputs.checkout_ref }} | |
fetch-depth: 0 # Required for brew test-bot to detect changes | |
- 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 | tee brew_test_log.txt | |
if grep -q "Warning: 1 failed step ignored!" brew_test_log.txt; then | |
echo "Test failed. Exiting with failure." | |
exit 1 | |
fi | |
- run: | | |
brew test-bot --only-setup | tee brew_test_log.txt | |
if grep -q "Warning: 1 failed step ignored!" brew_test_log.txt; then | |
echo "Test failed. Exiting with failure." | |
exit 1 | |
fi | |
- run: | | |
brew test-bot --only-tap-syntax | tee brew_test_log.txt | |
- if: github.event_name == 'pull_request' || inputs.checkout_ref != '' | |
run: | | |
brew test-bot --only-formulae mkectl | tee brew_test_log.txt | |
if grep -q "Warning: 1 failed step ignored!" brew_test_log.txt; then | |
echo "Test failed. Exiting with failure." | |
exit 1 | |
fi | |
- name: Upload bottles as artifact | |
uses: actions/upload-artifact@v4 | |
if: github.event_name == 'pull_request' || inputs.checkout_ref != '' | |
with: | |
name: bottles_${{ matrix.os }} | |
path: '*.bottle.*' |