Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 67 additions & 0 deletions .github/workflows/test-runner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: 'Test Runner'

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
name: 'Test macOS Setup Scripts'
runs-on: macos-latest
timeout-minutes: 60

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Make scripts executable
run: chmod +x src/scripts/*.sh

- name: Run setup scripts
run: |
# Skip pre-install.sh as it installs OS updates and Xcode Command Line Tools,

Check failure on line 26 in .github/workflows/test-runner.yaml

View workflow job for this annotation

GitHub Actions / Linters / Yamllint - YAML Linter

26:81 [line-length] line too long (87 > 80 characters)
# which takes too long in CI and is safe to assume works (Apple-provided commands).

Check failure on line 27 in .github/workflows/test-runner.yaml

View workflow job for this annotation

GitHub Actions / Linters / Yamllint - YAML Linter

27:81 [line-length] line too long (93 > 80 characters)
# GitHub Actions macOS runners already have these installed.
cd src/scripts
source utils.sh
bash organizeHome.sh 2>>"$ERROR_LOG_FILE" || true
bash cli.sh 2>>"$ERROR_LOG_FILE" || true
bash media.sh 2>>"$ERROR_LOG_FILE" || true
bash productivity.sh 2>>"$ERROR_LOG_FILE" || true
bash dev.sh 2>>"$ERROR_LOG_FILE" || true
bash security.sh 2>>"$ERROR_LOG_FILE" || true
zsh shell.sh 2>>"$ERROR_LOG_FILE" || true
bash post-install.sh 2>>"$ERROR_LOG_FILE" || true

- name: Check error log
working-directory: ${{ github.workspace }}
run: |
# Only show actual errors, not warnings or informational messages
# Look for lines that indicate real failures:
# - Lines starting with "Error:" (not "Warning:")
# - Fatal errors (excluding expected network issues and colima VM errors in CI)

Check failure on line 46 in .github/workflows/test-runner.yaml

View workflow job for this annotation

GitHub Actions / Linters / Yamllint - YAML Linter

46:81 [line-length] line too long (89 > 80 characters)
# - Exit status errors (excluding GitHub Actions messages)
# - Actual failure messages
ERROR_LOG="setup_errors.log"
if [[ -f "$ERROR_LOG" ]] && [[ -s "$ERROR_LOG" ]]; then
FILTERED_LOG=$(mktemp)
# First, remove function definitions and other noise
grep -v -E "(^[a-zA-Z_][a-zA-Z0-9_]* \(\)|^local |^mkdir -p|^cp |^curl |^if \[\[|^then|^else|^fi|^return |^export |^==> Fetching|^🍺.*was successfully installed)" "$ERROR_LOG" | \

Check failure on line 53 in .github/workflows/test-runner.yaml

View workflow job for this annotation

GitHub Actions / Linters / Yamllint - YAML Linter

53:81 [line-length] line too long (190 > 80 characters)
# Extract only actual errors, excluding known CI-safe errors
grep -E "(^Error:|^\[.*\] \[ERROR\]|fatal error|fatal:.*error|exit status [1-9]|exit code [1-9]|Failed to|failed to|FAILED)" | \

Check failure on line 55 in .github/workflows/test-runner.yaml

View workflow job for this annotation

GitHub Actions / Linters / Yamllint - YAML Linter

55:81 [line-length] line too long (142 > 80 characters)
grep -v -E "(fatal: unable to access.*Could not resolve host|chsh:.*Credentials|chsh:.*PAM|chsh:.*password|time=.*level=fatal.*colima|time=.*level=fatal.*error starting vm|Error: Process completed with exit code)" | \

Check failure on line 56 in .github/workflows/test-runner.yaml

View workflow job for this annotation

GitHub Actions / Linters / Yamllint - YAML Linter

56:81 [line-length] line too long (231 > 80 characters)
grep -v '^[[:space:]]*$' > "$FILTERED_LOG" || true

if [[ -s "$FILTERED_LOG" ]]; then
echo "❌ Errors found:"
cat "$FILTERED_LOG"
rm -f "$FILTERED_LOG"
exit 1
fi
rm -f "$FILTERED_LOG"
fi

Check failure on line 67 in .github/workflows/test-runner.yaml

View workflow job for this annotation

GitHub Actions / Linters / Yamllint - YAML Linter

67:1 [empty-lines] too many blank lines (1 > 0)
File renamed without changes.
29 changes: 2 additions & 27 deletions src/scripts/cli.sh
Original file line number Diff line number Diff line change
@@ -1,30 +1,5 @@
#!/bin/bash

# Source common functions
source "$(dirname "$0")/common.sh"
source "$(dirname "$0")/utils.sh"

# Check prerequisites
check_macos
check_homebrew

print_section "Installing CLI Tools"

# Define CLI tools to install
cli_tools=(
"bat"
"curl"
"eza"
"fastfetch"
"fd"
"git"
"htop"
"jq"
"ripgrep"
"vim"
"wget"
)

# Install CLI tools in parallel
install_brew_formulas_parallel "${cli_tools[@]}"

print_completion "CLI Tools Installation Complete"
brew install bat curl eza fastfetch fd git htop jq ripgrep vim wget 2>>"$ERROR_LOG_FILE" || true
Loading
Loading