Repository navigation
ci: add uv project skeleton with ruff, pyright, pytest checks and GitHub Actions - #4
Merged
Merged
Conversation
…ions Project skeleton for issue #1: a Python 3.13 uv project anyone can clone and check with one command. - src/interview_coach package with a smoke test importing it - ruff (lint + format), pyright and pytest as uv dev dependencies, lockfile committed - scripts/check.sh: one command running all four checks locally, the same command CI runs - GitHub Actions workflow running the checks on every pull request and on pushes to main, with pinned action versions - .gitignore for Python/uv artefacts plus local-only data folders (data/personal/, data/study-material/) - README Development section with setup and check instructions Closes #1
…filter, and uv sync --locked
…astral-sh/setup-uv@v10` could not be resolved because astral-sh/setup-uv publishes moving major tags only up to v7 (v8+ releases exist solely as exact vX.Y.Z tags, verified via git ls-remote), so GitHub errored ("unable to find version v10") before any step ran. Root-cause fix in .github/workflows/ci.yml: pin the action to the existing moving major tag `astral-sh/setup-uv@v7`, matching the existing `actions/checkout@v7` style; the `python-version: "3.13"` input is supported at v7 (confirmed in its action.yml). Verified by parsing the workflow YAML semantically (triggers, permissions, steps unchanged except the one ref), asserting both `uses:` refs resolve against the live remote repos, and running the workflow's own post-setup command `./scripts/check.sh` locally — ruff lint/format, pyright, and pytest all pass. Enumerated sibling sites: the only workflow file's only other `uses:` ref (actions/checkout@v7) already resolves; no other .github files reference actions. One-line change, no new machinery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
This PR implements issue #1: the project skeleton. It sets up a uv-managed Python 3.13 project that runs ruff lint and format checks, pyright type checks, and a pytest suite with one smoke test through a single documented command, locally and in GitHub Actions on every pull request and on pushes to master. It contains no agent code yet.
Closes #1
What Changed
pyproject.tomlwith a committeduv.lock, hatchlingsrclayout, and a stubsrc/interview_coachpackage (no agent code yet).scripts/check.sh..github/workflows/ci.yml) that runs the same checks on every pull request and pushes tomaster; README documents setup and check commands, anddata/personal/anddata/study-material/are git-ignored for local-only data.Risk Assessment
✅ Low: The change is a small, well-bounded CI/project skeleton whose three prior findings are verifiably fixed, all external references (action tags, default branch, lockfile) check out against reality, and no source-verifiable acceptance criterion remains unmet.
Testing
Drove the real check pipeline live six ways: the documented local flow passes on a synced worktree and on a pristine checkout via the CI's exact install command; all four gates plus the --locked guard adversarially fail when broken; gitignore semantics verified with real git; workflow validated by actionlint and semantic parsing against the repo's actual master default branch; reference links all resolve after fixing one dead pyright URL (committed as c2b9ddd). The only untested surface is the GitHub-hosted Actions run, which belongs to the outer executor's push/PR/CI phases.
Evidence: Local one-command checks pass (uv sync + ./scripts/check.sh)
Evidence: CI job replay: uv sync --locked on pristine checkout (lockfile unchanged)
Evidence: CI job replay: ./scripts/check.sh passes on pristine checkout
Evidence: Adversarial: each check gate fails on its own error class; uv sync --locked refuses drift
Evidence: Workflow semantic assertions (triggers, permissions, job steps) after actionlint passed
Evidence: HTTP status of every technical-reference link (one 404 fixed, re-checked 200)
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 3 issues found → auto-fixed ✅
.gitignore:13- gitignore has no trailing comments: everything after the pattern is literal, so.pytest_cache/ # pytest https://...(line 13) and.ruff_cache/ # ruff https://...(line 14) are broken patterns. Verified withgit check-ignore: paths like.pytest_cache/fooand.ruff_cache/fooare NOT ignored, so the first run of./scripts/check.shleaves both cache dirs untracked and committable. Fix: move each comment onto its own line above the pattern..github/workflows/ci.yml:7- The push trigger targetsbranches: [main], butgit ls-remote --symref https://github.com/lbildzinkas/interview-coach.git HEADshows the repository's default and only branch ismaster, so the push half of this workflow can never fire — the 'runs on pushes to main' acceptance criterion is dead in this repo as it exists. The issue text says 'pushes to main' verbatim while repo reality ismaster, so the remedy needs your decision: either change the filter to[master](or drop it) and update README.md's matching 'on pushes to main' wording, or rename the repo's default branch tomain. Note the pull_request trigger is unfiltered, so CI on this PR itself is unaffected..github/workflows/ci.yml:26-uv syncwithout--lockedwill silently re-resolve and rewrite uv.lock in CI if pyproject.toml ever drifts from it, contradicting the README's promise that everyone (including CI) gets versions pinned by the committed lock.uv sync --lockedfails fast instead; scripts/check.sh's implicituv runsyncs would then also stay consistent since the install step already validated the lock.🔧 Fix applied.
✅ Re-checked - no issues remain.
pyproject.toml:44- The [tool.pyright] comment linked to https://microsoft.github.io/pyright/docs/configuration/, which returns 404 (the pyright docs site was restructured; its /docs/ subtree is gone). This broke the issue's acceptance criterion that config comments link to working technical references. Found during link validation, fixed in this phase (commit c2b9ddd) by pointing to the canonical current reference https://github.com/microsoft/pyright/blob/main/docs/configuration.md (verified 200); all 17 reference links in the change now resolve and ./scripts/check.sh still passes.uv sync (verbatim README flow) then ./scripts/check.sh in the worktree — all four checks pass, exit 0git check-ignore -v with scratch files in data/personal/, data/study-material/, .venv, .pytest_cache, .ruff_cache; git status --porcelain empty; git ls-files data/ shows only .gitkeep filesPristine-checkout CI replay: git archive HEAD into .ci-sim, uv sync --locked (lockfile byte-identical after), ./scripts/check.sh — exit 0Adversarial gates in the disposable copy: unused import -> exit 1 at ruff check; single-quoted string -> exit 1 at ruff format --check (lint passed); int/str mismatch -> exit 1 at pyright; failing assert -> exit 1 at pytestAdversarial lock guard: sed pyproject to pytest>=8.5, uv sync --locked -> exit 1 with 'lockfile needs to be updated', uv.lock not rewrittenactionlint .github/workflows/ci.yml — exit 0; YAML parsed via PyYAML and asserted: pull_request (unfiltered) + push to [master], contents:read permission, ubuntu-latest job running uv sync --locked then ./scripts/check.sh after checkout@v7 and setup-uv@v10 (Python 3.13)HTTP link validation of all reference URLs in changed files (one 404 found and fixed; re-checked 200); ./scripts/check.sh re-run after fix — exit 0gh run list --repo lbildzinkas/interview-coach (read-only) — no runs exist yet; remote HEAD default branch confirmed master✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.