telepath release v1.0.1 #10
Workflow file for this run
This file contains hidden or 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: Test Homebrew Formulas | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Check out the repository | |
| - name: Check out code | |
| uses: actions/checkout@v3 | |
| # Set up Homebrew | |
| - name: Set up Homebrew | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential curl file git | |
| /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bashrc | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| # Tap tech-thinker/tap | |
| - name: Tap tech-thinker/tap | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| brew tap tech-thinker/tap | |
| # Install and test all formulas in the Formula directory | |
| - name: Test all formulas | |
| run: | | |
| eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
| # Find all formula files in the Formula directory | |
| FORMULAS=$(find Formula -name "*.rb") | |
| # Loop through each formula | |
| for formula in $FORMULAS; do | |
| formula_name=$(basename $formula .rb) | |
| echo "Testing $formula_name..." | |
| brew install --build-from-source ./Formula/$formula_name.rb | |
| brew test ./Formula/$formula_name.rb | |
| brew uninstall $formula_name | |
| done |