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
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test

on:
pull_request:
push:
branches:
- master
Copy link

Copilot AI Jun 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow is set to trigger on pushes to 'master', but the repository's default branch is 'main' (per your index). Update this to 'main' or use the default branch name to ensure CI runs as expected.

Suggested change
- master
- main

Copilot uses AI. Check for mistakes.

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: pip install pytest toml
- name: Run tests
run: pytest -v
18 changes: 18 additions & 0 deletions tests/test_configs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import json
import pathlib

try:
import tomllib # Python 3.11+
except ModuleNotFoundError: # pragma: no cover - fallback for older versions
import toml as tomllib


def test_load_configs():
repo_root = pathlib.Path(__file__).resolve().parents[1]
karabiner_path = repo_root / ".config" / "karabiner" / "karabiner.json"
with karabiner_path.open('r', encoding='utf-8') as f:
json.load(f)

starship_path = repo_root / ".config" / "starship.toml"
with starship_path.open('rb') as f:
tomllib.load(f)