mirror of
https://github.com/ivuorinen/everforest-resources.git
synced 2026-03-12 12:59:49 +00:00
feat: consolidate GitHub workflows and improve install script
- Remove redundant workflows (build.yml, snapshots.yml, cli-verify.yml) - Integrate all functionality into comprehensive ci.yml workflow - Add job dependencies to optimize CI execution and avoid duplicate work - Update all workflows to use node-version-file with .nvmrc - Enhance install script with better tool availability checking - Add install_tool_config function to skip missing tools with clear notifications This reduces workflow files by 50% (6→3) while maintaining all functionality and improving CI efficiency through better job orchestration.
This commit is contained in:
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@@ -1,40 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
||||||
with:
|
|
||||||
node-version-file: ".nvmrc"
|
|
||||||
cache: "npm"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Lint code
|
|
||||||
run: npm run lint
|
|
||||||
|
|
||||||
- name: Generate themes
|
|
||||||
run: npm run generate
|
|
||||||
|
|
||||||
- name: Validate output
|
|
||||||
run: npm run validate
|
|
||||||
|
|
||||||
- name: Check for uncommitted changes
|
|
||||||
run: |
|
|
||||||
if ! git diff --quiet; then
|
|
||||||
echo "Generated files have uncommitted changes!"
|
|
||||||
git diff
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -28,6 +28,7 @@ jobs:
|
|||||||
generate:
|
generate:
|
||||||
name: Generate Themes
|
name: Generate Themes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: lint
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
@@ -57,8 +58,9 @@ jobs:
|
|||||||
echo "✅ All generated files are up to date"
|
echo "✅ All generated files are up to date"
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test Web Components
|
name: Test Web Components & Snapshots
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: generate
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|
||||||
@@ -74,9 +76,15 @@ jobs:
|
|||||||
- name: Install Playwright browsers
|
- name: Install Playwright browsers
|
||||||
run: npx playwright install --with-deps
|
run: npx playwright install --with-deps
|
||||||
|
|
||||||
- name: Run Playwright tests
|
- name: Generate themes
|
||||||
|
run: npm run generate
|
||||||
|
|
||||||
|
- name: Run Playwright e2e tests
|
||||||
run: npm run test:e2e
|
run: npm run test:e2e
|
||||||
|
|
||||||
|
- name: Generate snapshots
|
||||||
|
run: npm run snapshots
|
||||||
|
|
||||||
- name: Upload Playwright report
|
- name: Upload Playwright report
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||||
if: always()
|
if: always()
|
||||||
@@ -88,6 +96,7 @@ jobs:
|
|||||||
verify-installation:
|
verify-installation:
|
||||||
name: Verify Installation Scripts
|
name: Verify Installation Scripts
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
needs: generate
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
@@ -142,6 +151,7 @@ jobs:
|
|||||||
build-stats:
|
build-stats:
|
||||||
name: Build Statistics
|
name: Build Statistics
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: generate
|
||||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||||
|
|||||||
37
.github/workflows/cli-verify.yml
vendored
37
.github/workflows/cli-verify.yml
vendored
@@ -1,37 +0,0 @@
|
|||||||
name: CLI Verify
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
cli-verify:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
||||||
with:
|
|
||||||
node-version-file: ".nvmrc"
|
|
||||||
cache: "npm"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Generate themes
|
|
||||||
run: npm run generate
|
|
||||||
|
|
||||||
- name: Run installer
|
|
||||||
run: |
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
./cli/install.sh
|
|
||||||
|
|
||||||
- name: Run verifier
|
|
||||||
run: |
|
|
||||||
export HOME=$(mktemp -d)
|
|
||||||
./cli/install.sh
|
|
||||||
ENGINE=docker ./verify/verify.sh
|
|
||||||
40
.github/workflows/snapshots.yml
vendored
40
.github/workflows/snapshots.yml
vendored
@@ -1,40 +0,0 @@
|
|||||||
name: Snapshots
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
snapshots:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
|
||||||
with:
|
|
||||||
node-version-file: ".nvmrc"
|
|
||||||
cache: "npm"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
|
|
||||||
- name: Install Playwright browsers
|
|
||||||
run: npx playwright install --with-deps
|
|
||||||
|
|
||||||
- name: Generate themes
|
|
||||||
run: npm run generate
|
|
||||||
|
|
||||||
- name: Run Playwright tests
|
|
||||||
run: npm run snapshots
|
|
||||||
|
|
||||||
- name: Upload snapshots
|
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
||||||
if: failure()
|
|
||||||
with:
|
|
||||||
name: playwright-report
|
|
||||||
path: playwright-report/
|
|
||||||
retention-days: 30
|
|
||||||
83
install.sh
83
install.sh
@@ -123,6 +123,35 @@ check_config_dir() {
|
|||||||
[[ -d "$CONFIG_DIR/$dir" ]] || [[ -d "$HOME/.$dir" ]] || [[ -d "$HOME/Library/Application Support/$dir" ]]
|
[[ -d "$CONFIG_DIR/$dir" ]] || [[ -d "$HOME/.$dir" ]] || [[ -d "$HOME/Library/Application Support/$dir" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Check if tool is available (installed or has config directory)
|
||||||
|
check_tool_available() {
|
||||||
|
local tool="$1"
|
||||||
|
local config_dir="$2"
|
||||||
|
|
||||||
|
if check_tool "$tool"; then
|
||||||
|
return 0
|
||||||
|
elif check_config_dir "$config_dir"; then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install with tool availability check
|
||||||
|
install_tool_config() {
|
||||||
|
local tool_name="$1"
|
||||||
|
local config_name="$2"
|
||||||
|
local src="$3"
|
||||||
|
local dest="$4"
|
||||||
|
local display_name="$5"
|
||||||
|
|
||||||
|
if check_tool_available "$tool_name" "$config_name"; then
|
||||||
|
install_file "$src" "$dest" "$display_name"
|
||||||
|
else
|
||||||
|
log_info "Skipping $display_name (tool not installed and no config directory found)"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Validate variant
|
# Validate variant
|
||||||
validate_variant() {
|
validate_variant() {
|
||||||
local valid_variants=("dark-hard" "dark-medium" "dark-soft" "light-hard" "light-medium" "light-soft")
|
local valid_variants=("dark-hard" "dark-medium" "dark-soft" "light-hard" "light-medium" "light-soft")
|
||||||
@@ -182,34 +211,22 @@ install_terminals() {
|
|||||||
log_header "Installing Terminal Themes ($VARIANT)"
|
log_header "Installing Terminal Themes ($VARIANT)"
|
||||||
|
|
||||||
# Alacritty
|
# Alacritty
|
||||||
if check_tool "alacritty" || check_config_dir "alacritty"; then
|
install_tool_config "alacritty" "alacritty" \
|
||||||
install_file \
|
|
||||||
"$SCRIPT_DIR/terminals/alacritty/everforest-$VARIANT.yml" \
|
"$SCRIPT_DIR/terminals/alacritty/everforest-$VARIANT.yml" \
|
||||||
"$CONFIG_DIR/alacritty/themes/everforest-$VARIANT.yml" \
|
"$CONFIG_DIR/alacritty/themes/everforest-$VARIANT.yml" \
|
||||||
"Alacritty theme"
|
"Alacritty theme"
|
||||||
else
|
|
||||||
log_info "Skipping Alacritty (not installed)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Kitty
|
# Kitty
|
||||||
if check_tool "kitty" || check_config_dir "kitty"; then
|
install_tool_config "kitty" "kitty" \
|
||||||
install_file \
|
|
||||||
"$SCRIPT_DIR/terminals/kitty/everforest-$VARIANT.conf" \
|
"$SCRIPT_DIR/terminals/kitty/everforest-$VARIANT.conf" \
|
||||||
"$CONFIG_DIR/kitty/themes/everforest-$VARIANT.conf" \
|
"$CONFIG_DIR/kitty/themes/everforest-$VARIANT.conf" \
|
||||||
"Kitty theme"
|
"Kitty theme"
|
||||||
else
|
|
||||||
log_info "Skipping Kitty (not installed)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# WezTerm
|
# WezTerm
|
||||||
if check_tool "wezterm" || check_config_dir "wezterm"; then
|
install_tool_config "wezterm" "wezterm" \
|
||||||
install_file \
|
|
||||||
"$SCRIPT_DIR/terminals/wezterm/everforest-$VARIANT.lua" \
|
"$SCRIPT_DIR/terminals/wezterm/everforest-$VARIANT.lua" \
|
||||||
"$CONFIG_DIR/wezterm/colors/everforest-$VARIANT.lua" \
|
"$CONFIG_DIR/wezterm/colors/everforest-$VARIANT.lua" \
|
||||||
"WezTerm theme"
|
"WezTerm theme"
|
||||||
else
|
|
||||||
log_info "Skipping WezTerm (not installed)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Windows Terminal (if on Windows or WSL)
|
# Windows Terminal (if on Windows or WSL)
|
||||||
if [[ -n "${WSL_DISTRO_NAME:-}" ]] || command -v wsl.exe >/dev/null 2>&1; then
|
if [[ -n "${WSL_DISTRO_NAME:-}" ]] || command -v wsl.exe >/dev/null 2>&1; then
|
||||||
@@ -219,18 +236,16 @@ install_terminals() {
|
|||||||
"$SCRIPT_DIR/terminals/windows-terminal/everforest-$VARIANT.json" \
|
"$SCRIPT_DIR/terminals/windows-terminal/everforest-$VARIANT.json" \
|
||||||
"$wt_dest/everforest-$VARIANT.json" \
|
"$wt_dest/everforest-$VARIANT.json" \
|
||||||
"Windows Terminal theme"
|
"Windows Terminal theme"
|
||||||
|
else
|
||||||
|
log_info "Skipping Windows Terminal (config directory not found)"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ghostty
|
# Ghostty
|
||||||
if check_tool "ghostty" || check_config_dir "ghostty"; then
|
install_tool_config "ghostty" "ghostty" \
|
||||||
install_file \
|
|
||||||
"$SCRIPT_DIR/terminals/ghostty/everforest-$VARIANT.conf" \
|
"$SCRIPT_DIR/terminals/ghostty/everforest-$VARIANT.conf" \
|
||||||
"$CONFIG_DIR/ghostty/themes/everforest-$VARIANT.conf" \
|
"$CONFIG_DIR/ghostty/themes/everforest-$VARIANT.conf" \
|
||||||
"Ghostty theme"
|
"Ghostty theme"
|
||||||
else
|
|
||||||
log_info "Skipping Ghostty (not installed)"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install editor themes
|
# Install editor themes
|
||||||
@@ -291,16 +306,12 @@ install_cli() {
|
|||||||
log_header "Installing CLI Tools ($VARIANT)"
|
log_header "Installing CLI Tools ($VARIANT)"
|
||||||
|
|
||||||
# Core shell tools
|
# Core shell tools
|
||||||
if check_tool "starship"; then
|
install_tool_config "starship" "starship" \
|
||||||
install_file \
|
|
||||||
"$SCRIPT_DIR/cli/starship/starship-$VARIANT.toml" \
|
"$SCRIPT_DIR/cli/starship/starship-$VARIANT.toml" \
|
||||||
"$CONFIG_DIR/starship/themes/everforest-$VARIANT.toml" \
|
"$CONFIG_DIR/starship/themes/everforest-$VARIANT.toml" \
|
||||||
"Starship theme"
|
"Starship theme"
|
||||||
else
|
|
||||||
log_info "Skipping Starship prompt (not installed)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
install_file \
|
install_tool_config "fish" "fish" \
|
||||||
"$SCRIPT_DIR/cli/fish/everforest-$VARIANT.fish" \
|
"$SCRIPT_DIR/cli/fish/everforest-$VARIANT.fish" \
|
||||||
"$CONFIG_DIR/fish/conf.d/everforest-$VARIANT.fish" \
|
"$CONFIG_DIR/fish/conf.d/everforest-$VARIANT.fish" \
|
||||||
"Fish colors"
|
"Fish colors"
|
||||||
@@ -311,7 +322,7 @@ install_cli() {
|
|||||||
"$CONFIG_DIR/dircolors/everforest.sh" \
|
"$CONFIG_DIR/dircolors/everforest.sh" \
|
||||||
"LS_COLORS"
|
"LS_COLORS"
|
||||||
|
|
||||||
install_file \
|
install_tool_config "eza" "eza" \
|
||||||
"$SCRIPT_DIR/cli/eza/everforest-$VARIANT.sh" \
|
"$SCRIPT_DIR/cli/eza/everforest-$VARIANT.sh" \
|
||||||
"$CONFIG_DIR/eza/theme.sh" \
|
"$CONFIG_DIR/eza/theme.sh" \
|
||||||
"eza colors"
|
"eza colors"
|
||||||
@@ -322,43 +333,39 @@ install_cli() {
|
|||||||
"$CONFIG_DIR/git/everforest-delta" \
|
"$CONFIG_DIR/git/everforest-delta" \
|
||||||
"Git delta"
|
"Git delta"
|
||||||
|
|
||||||
install_file \
|
install_tool_config "lazygit" "lazygit" \
|
||||||
"$SCRIPT_DIR/cli/lazygit/config-$VARIANT.yml" \
|
"$SCRIPT_DIR/cli/lazygit/config-$VARIANT.yml" \
|
||||||
"$CONFIG_DIR/lazygit/themes/everforest-$VARIANT.yml" \
|
"$CONFIG_DIR/lazygit/themes/everforest-$VARIANT.yml" \
|
||||||
"LazyGit theme"
|
"LazyGit theme"
|
||||||
|
|
||||||
install_file \
|
install_tool_config "gitui" "gitui" \
|
||||||
"$SCRIPT_DIR/cli/gitui/theme-$VARIANT.ron" \
|
"$SCRIPT_DIR/cli/gitui/theme-$VARIANT.ron" \
|
||||||
"$CONFIG_DIR/gitui/themes/everforest-$VARIANT.ron" \
|
"$CONFIG_DIR/gitui/themes/everforest-$VARIANT.ron" \
|
||||||
"GitUI theme"
|
"GitUI theme"
|
||||||
|
|
||||||
# System monitoring
|
# System monitoring
|
||||||
install_file \
|
install_tool_config "htop" "htop" \
|
||||||
"$SCRIPT_DIR/cli/htop/htoprc-$VARIANT" \
|
"$SCRIPT_DIR/cli/htop/htoprc-$VARIANT" \
|
||||||
"$CONFIG_DIR/htop/themes/everforest-$VARIANT" \
|
"$CONFIG_DIR/htop/themes/everforest-$VARIANT" \
|
||||||
"htop theme"
|
"htop theme"
|
||||||
|
|
||||||
install_file \
|
install_tool_config "btop" "btop" \
|
||||||
"$SCRIPT_DIR/cli/btop/everforest-$VARIANT.theme" \
|
"$SCRIPT_DIR/cli/btop/everforest-$VARIANT.theme" \
|
||||||
"$CONFIG_DIR/btop/themes/everforest.theme" \
|
"$CONFIG_DIR/btop/themes/everforest.theme" \
|
||||||
"btop theme"
|
"btop theme"
|
||||||
|
|
||||||
install_file \
|
install_tool_config "bottom" "bottom" \
|
||||||
"$SCRIPT_DIR/cli/bottom/bottom-$VARIANT.toml" \
|
"$SCRIPT_DIR/cli/bottom/bottom-$VARIANT.toml" \
|
||||||
"$CONFIG_DIR/bottom/themes/everforest-$VARIANT.toml" \
|
"$CONFIG_DIR/bottom/themes/everforest-$VARIANT.toml" \
|
||||||
"bottom theme"
|
"bottom theme"
|
||||||
|
|
||||||
# Other tools
|
# Other tools
|
||||||
if check_tool "fzf"; then
|
install_tool_config "fzf" "fzf" \
|
||||||
install_file \
|
|
||||||
"$SCRIPT_DIR/cli/fzf/everforest-$VARIANT.sh" \
|
"$SCRIPT_DIR/cli/fzf/everforest-$VARIANT.sh" \
|
||||||
"$CONFIG_DIR/fzf/everforest.sh" \
|
"$CONFIG_DIR/fzf/everforest.sh" \
|
||||||
"FZF colors"
|
"FZF colors"
|
||||||
else
|
|
||||||
log_info "Skipping FZF colors (not installed)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
install_file \
|
install_tool_config "tmux" "tmux" \
|
||||||
"$SCRIPT_DIR/cli/tmux/everforest.tmux-$VARIANT.conf" \
|
"$SCRIPT_DIR/cli/tmux/everforest.tmux-$VARIANT.conf" \
|
||||||
"$CONFIG_DIR/tmux/themes/everforest.conf" \
|
"$CONFIG_DIR/tmux/themes/everforest.conf" \
|
||||||
"tmux theme"
|
"tmux theme"
|
||||||
|
|||||||
Reference in New Issue
Block a user