agentleFS
AmineDjeghriAmineDjeghri/awesome-os-setup/.claude/skills/run-tests/SKILL.md

run-tests

Skill682 starsChanged 6 days agoMITView on GitHub

Use when writing/running tests, interpreting coverage, or checking documented behavior against Make targets, quality gates and validation claims in personal-os-setup.

50 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use prepare-release, create-pr and 3 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ShopifySkill

    prepare-release

    Prepare the changeset-release/main branch for release by syncing version.ts files and running pnpm install

    Also in 3 projects that use this

  • SentrySkill

    create-pr

    Create pull requests following Sentry conventions. Use when opening PRs, writing PR descriptions, or preparing changes for review. Follows Sentry's code review guidelines.

    Also in 4 projects that use this

  • SentrySkill

    commit

    Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.

    Also in 4 projects that use this

  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 5 projects that use this

  • GoogleSkill

    code-review

    Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 45 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read docs/developer/4.testing.md for the test suites and current targets.

    line 11
  2. Very specific:

    Use tmp_path and monkeypatch.

    line 36
  3. Distinctive:

    Never run either without explicit authorization.

    line 48

“Common” is measured: kept by at least 6 in 10 of the 45 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Testing in personal-os-setup

Read docs/developer/4.testing.md for the test suites and current targets.

Safe local checks

  1. make test-local runs tests/unit and tests/skills with xdist (N=4, or N=1 for debugging). Plain pytest has the same safe testpaths. Empty collection fails.
  2. make test-all adds real wheel/sdist identity/resource checks and isolated wheel installation. The console callable loads without starting the app (startup can self-update and prepare sudo).
  3. make test-coverage reuses test-all with separate Python coverage in reports/coverage.xml. Coverage does not establish OS integration completeness; no threshold is imposed yet.
  4. make check runs pre-commit-status (hook warning), static/docs hooks, test-all and docs-build. make install-dev prepares the environment and the Git hooks; checks never install them.

Full validation targets reject ARGS and PYTEST_ADDOPTS. Use make test-local ARGS="-k release" for focused debugging, including collection-only runs.

Isolation conventions

  • Patch at the import site: frontend chezmoi functions at personal_os_setup.frontend.app.chezmoi_*, managers at personal_os_setup.tasks.managers.<backend>.run / sudo_non_interactive_ok. shutil.which is patched globally because managers access it through that module.
  • Frontend tests live in tests/unit/frontend; its shared autouse fixture supplies a synthetic catalog, sections and managed paths, and fails on unexpected real manager/chezmoi actions. Override only the calls a test intentionally exercises. Never wire tests to real system actions.
  • Fake results with TaskResult, InstallResult or MagicMock(returncode=..., stdout=..., stderr=...). Use tmp_path and monkeypatch; xdist workers must share no mutable state.
  • Textual async tests need pytest.mark.asyncio in strict mode. Poll app.is_busy with Pilot pauses for thread workers, and find dynamic TabPanes through a known child rather than fixed generated IDs.
  • Settings tests set environment values and reload the settings module; values are read at import.
  • Release regressions use explicit Git/uv/Make/GitHub stubs. Docs generators use temporary source/output trees; integration-report tests launch pytest only against synthetic modules.
  • tests/skills deploys into temporary roots with a fake installer. POSIX Bash/jq are required; its chezmoi case skips when absent, and native Windows skips the POSIX harness.

OS validation boundary

make test-integration and tests/archlinux can run real host-mutating commands on Linux/macOS. Never run either without explicit authorization; a generic request to test means safe local suites. Windows integration is deliberately read-only.

Hosted CI requires self-contained tests and executed integration on Ubuntu/macOS/Windows. Other operating systems' skips are expected, but zero passing integration tests, deselection and collection-only runs fail through scripts/integration_results.py. CachyOS integration is not exercised by hosted CI; the Arch container is an interactive sandbox. A local make check pass does not establish that required CI passed.

Tooling boundaries and gate gotchas

  • Bare make shows help. make install-uv installs only when missing; make update-uv updates. make install-prod = runtime deps only; make install-dev = tools + Git hooks (pre-commit-install repeats, pre-commit-status checks).
  • make pre-commit runs prepared tools without sync or hook install. New untracked files need make pre-commit FILES="<paths>"; --all-files sees only tracked files.
  • The strict docs hook calls make docs-build. Installation smoke checks a real isolated wheel and loads the personal-os-setup callable without starting the app; artifact checks also need matching sdist metadata/resources.
  • actionlint and zizmor are enabled; pip-audit, bandit and markdown-link-check remain commented out in .pre-commit-config.yaml.
  • commitizen runs only at the commit-msg stage — a green pre-commit says nothing about message format.
  • detect-secrets is stateless: allowlist false positives inline, never whole-file. Existing exclusions cover only generated payload/lock content and binary artifacts.
  • Formatting hooks can rewrite files and fail the first run — recheck final content.
  • properdocs.yml uses docs_dir: . — new top-level output dirs need an exclude entry (see [[docs-site]]).
  • packages.yaml manager registrations are checked by tests/unit/test_detect_os.py::TestPackagesYaml.
  • CI releases from main (stable) and dev (rc) bind to the tested revision; local make release uses HEAD; interrupted tag/version publication can resume verified asset uploads (see the release guide).
  • make act may mutate its execution environment — not a test-local replacement. tests/archlinux is a manual interactive sandbox, not CachyOS validation.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.