feat(nix): add flake checks for CI validation#136
Closed
Conversation
Consolidate all CI checks into nix flake check for unified validation: - formatting: treefmt check (nixfmt, ruff-check, ruff-format, oxfmt) - gitleaks: secret detection - uv-lock: verify lockfile is up to date - ty: type checking with Python 3.13 - pytest: test suite execution All checks use --locked flag to ensure lockfile consistency and pin Python to 3.13 for compatibility with dependencies like onnxruntime.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes CI validation into nix flake check, adding Nix-based checks that mirror the existing local tooling (treefmt, gitleaks, uv, ty, pytest) for consistent local and CI workflows.
Changes:
- Added a
checksattribute set underperSystemdefiningformatting,gitleaks,uv-lock,ty, andpytestchecks. - Implemented
pkgs.runCommand-based derivations for each check, wiring in the appropriate tools (treefmtEval,gitleaks,uv,ty,python313,bun,pnpm_10,typescript-go,git,cacert) and a git-tracked, pure source tree viapkgs.lib.fileset.toSource. - Ensured Python-related checks (
uv-lock,ty,pytest) run in isolated environments usinguvwith--lockedand a pinnedpython313, matching the PR’s reproducibility and versioning goals.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Consolidate all CI checks into
nix flake checkfor unified local and CI validation.What Changed
Added 5 flake checks:
--no-gitflag for pure evaluationuv lock --check)Why
nix flake check--lockedflagTesting
All 5 checks pass (189 tests passed, 20 skipped).
Summary by cubic
Consolidates CI validation into nix flake check, so the same checks run locally and in CI with one command. Adds unified checks for formatting, secrets, lockfile, type checking, and tests.
Written for commit e214da0. Summary will update on new commits.