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
6 changes: 4 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Git
# Git (keep .gitignore for tests)
.git/
.gitignore
.github/

# DevContainer (not needed for tests, uses JSONC format)
.devcontainer/

# Documentation (not needed for tests)
*.md
!README.md
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Validate JSON files
run: |
echo "Validating JSON files..."
find . -name "*.json" ! -path "./.git/*" ! -path "./node_modules/*" | while read -r file; do
find . -name "*.json" ! -path "./.git/*" ! -path "./node_modules/*" ! -path "*/.devcontainer/*" ! -path "*/tmux/plugins/*" | while read -r file; do
echo "Checking $file"
jq empty "$file" || exit 1
done
Expand Down
13 changes: 9 additions & 4 deletions tests/test-configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,16 @@ fi

# Test: No backup files in repo (should be gitignored)
test_start "no backup files tracked in git"
backup_files=$(git -C "$REPO_ROOT" ls-files | grep -E '\.(bak|backup|old|swp|tmp)$' || true)
if [[ -z "$backup_files" ]]; then
test_pass
if [[ -d "$REPO_ROOT/.git" ]]; then
backup_files=$(git -C "$REPO_ROOT" ls-files | grep -E '\.(bak|backup|old|swp|tmp)$' || true)
if [[ -z "$backup_files" ]]; then
test_pass
else
test_fail "Found backup files in git: $backup_files"
fi
else
test_fail "Found backup files in git: $backup_files"
# Skip test if not a git repository (e.g., in Docker)
skip_test "Not a git repository"
fi

# Test: .gitignore exists and has content
Expand Down
Loading