Skip to content

Update Claude settings #30

Update Claude settings

Update Claude settings #30

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Syntax check shell scripts
run: |
# Exhaustively syntax-check every tracked shell script in the repo.
# Pick the interpreter from the shebang:
# - bash shebang -> bash -n
# - #!/bin/sh (= dash) -> sh -n (bash -n misses syntax that fails under dash)
# - no shebang -> bash -n (env.sh / env.d/* are fragments sourced by
# bash/zsh and contain bash syntax, so sh -n false-flags)
st=0
while IFS= read -r f; do
case "$(head -n1 "$f")" in
*bash*) checker="bash -n" ;;
'#!'*sh*) checker="sh -n" ;;
*) checker="bash -n" ;;
esac
echo "==> $checker $f"
$checker "$f" || st=1
done < <(git ls-files '*.sh')
exit $st
ubuntu-setup:
# Actually run the Codespaces / WSL Ubuntu setup (apt + parallel *env install)
runs-on: ubuntu-latest
timeout-minutes: 60
env:
DOTFILES_SETUP_LOGDIR: /tmp/dotfiles-setup-logs
steps:
- uses: actions/checkout@v4
- name: Run Ubuntu setup
run: ./script/setup-ubuntu.sh
- name: Verify installed versions
run: |
set -euo pipefail
nodenv="$HOME/.nodenv/bin/nodenv"
rbenv="$HOME/.rbenv/bin/rbenv"
pyenv="$HOME/.pyenv/bin/pyenv"
goenv="$HOME/.goenv/bin/goenv"
# Extract the pinned version from each setup script's VERSION= line
# rather than hardcoding it here, so the check never drifts from the source.
expected_version() {
sed -n 's/^VERSION=\(.*\)$/\1/p' "$1" | head -n1
}
st=0
assert_version() {
name="$1"; expected="$2"; actual="$3"
if [ "$expected" = "$actual" ]; then
echo "✓ $name: $actual (expected $expected)"
else
echo "✗ $name: got '$actual', expected '$expected'"
st=1
fi
}
node_expected="$(expected_version setup.d/ubuntu/002-nodenv.sh)"
ruby_expected="$(expected_version setup.d/ubuntu/003-rbenv.sh)"
python_expected="$(expected_version setup.d/ubuntu/004-pyenv.sh)"
go_expected="$(expected_version setup.d/ubuntu/005-goenv.sh)"
# `*env exec` runs each *env's selected-version binary directly, without
# depending on PATH/shims ordering. However, *env honors a directory-local
# pin (e.g. .ruby-version) over the global one. This repo itself has
# `.ruby-version = system` at its root, so to verify the global that setup
# installed we must run from a neutral directory ($HOME).
# node --version → "v24.16.0": strip the leading v
assert_version node "$node_expected" "$(cd "$HOME" && "$nodenv" exec node --version | sed 's/^v//')"
# ruby --version → "ruby 4.0.5 (...) ...": 2nd field
assert_version ruby "$ruby_expected" "$(cd "$HOME" && "$rbenv" exec ruby --version | awk '{print $2}')"
# python --version → "Python 3.14.6": 2nd field
assert_version python "$python_expected" "$(cd "$HOME" && "$pyenv" exec python --version | awk '{print $2}')"
# go version → "go version go1.26.4 linux/amd64": strip the go prefix
assert_version go "$go_expected" "$(cd "$HOME" && "$goenv" exec go version | awk '{print $3}' | sed 's/^go//')"
# On mismatch, dump each *env's selection to help diagnose the cause
if [ "$st" -ne 0 ]; then
echo "--- diagnostics ---"
"$rbenv" version || true
"$rbenv" which ruby || true
"$goenv" version || true
fi
gcloud --version
exit $st
- name: Upload setup logs
if: always()
uses: actions/upload-artifact@v4
with:
name: setup-logs
path: /tmp/dotfiles-setup-logs/
if-no-files-found: ignore