Repository navigation
Update copier exclusions - #5
Merged
Merged
Conversation
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
Adds security, quality and dependency tooling to this repo and to the Copier template, so that every generated project starts with the same checks locally, in Git hooks and in CI.
GitHub Actions security
just lintin both repos. actionlint comes from Homebrew locally and is installed with uv (actionlint-py) in CI and the dev container.actions/checkoutsetspersist-credentials: false.just gitleaksfor a full history scan, and as a CI job usinggitleaks/gitleaks-actionv3. The job haspull-requests: readso PR scans work in private repos.Git hooks
prek.toml) runsjust lintand gitleaks before each commit.just setupin the template installs the hooks, and so does the dev container when the workspace is a Git repo.Rust tooling (template)
deny.toml,just deny): security advisories, an allowlist of permissive licenses, banned crates and crates.io-only sources. It runs as a separate CI step.just msrv, a new CI job): builds with therust-versionfromCargo.toml, which is raised to 1.99.just testruns nextest, thencargo test --doc.just coverage, a CI step): cargo-llvm-cov fails belowcoverage_threshold(98% by default, set at the top of the justfile).src/main.rsis excluded. Adds thellvm-tools-previewtoolchain component.-D warningsinjust lintto catch broken doc links.just lintcatches unused dependencies.[lints]table:unsafe_code = "forbid",missing_docs = "warn"and clippypedantic. The starter code is updated to pass.Formatting and spelling (both repos)
just lint.just lint, andjust fmtfixes it.deny.toml,rust-toolchain.tomland theCargo.tomllint tables are reformatted to match.Tool installation
cargo_toolsin each justfile.just install-toolsinstalls them with cargo-binstall, installing cargo-binstall itself withcargo installif needed.just updatebumps the pinned versions to the latest releases and reinstalls them.~/.cargo/binand Homebrew's rustup to the PATH.taiki-e/install-action. The dev container usescargo installfor zizmor, prek and uv,just install-toolsfor the pinned tools, and a checksum-verified gitleaks release.Dependabot
.github/dependabot.ymlin both repos sets up weekly grouped updates with a 7-day cooldown: GitHub Actions in this repo (includingtemplate/), and Cargo plus GitHub Actions in the template.dependabot-auto-merge.ymlsquash-merges patch and minor updates once CI passes. Major updates wait for review.Template behaviour
copier updateno longer touchessrc/lib.rs,src/main.rsortests/greeting.rs, so projects can change, move or delete the starter code._min_copier_versionis raised to 9.6.0.just test-templatenow also runsjust coverageandjust denyon the generated project.Docs
template/CLAUDE.mddescribe the new commands, checks, setup and Dependabot behaviour.Setup needed after merging
mainthat requires the CI checks. Private repos need a paid GitHub plan for this.GITLEAKS_LICENSEsecret, both as an Actions secret and as a Dependabot secret.Not yet tested
copier updateon a project that has moved or deleted the starter filesChecklist
just lintpassesjust test-templatepassesREADME.md,template/README.md.jinja,template/CLAUDE.md)