Repository navigation
ci: migrate hook configuration to prek and mise #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,63 @@ | ||||||
| [settings] | ||||||
| experimental = true | ||||||
| lockfile = true | ||||||
| lockfile_platforms = ["linux-x64", "macos-arm64"] | ||||||
|
|
||||||
| [tool_config] | ||||||
| locked = true | ||||||
|
|
||||||
| [tools] | ||||||
| go = "1.26.9" | ||||||
| golangci-lint = "2.15.0" | ||||||
| goreleaser = "2.18.3" | ||||||
| prek = "0.5.5" | ||||||
|
|
||||||
| [tasks.setup] | ||||||
| description = "Install dependencies and git hooks" | ||||||
| depends = ["setup:dependencies", "setup:hooks"] | ||||||
|
|
||||||
| [tasks."setup:dependencies"] | ||||||
| description = "Download Go modules" | ||||||
| run = "go mod download" | ||||||
|
|
||||||
| [tasks."setup:hooks"] | ||||||
| description = "Install prek git hooks" | ||||||
| run = "prek install" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Install the After Proposed change--- "a/mise.toml"
+++ "b/mise.toml"
@@ -22,7 +22,7 @@
[tasks."setup:hooks"]
description = "Install prek git hooks"
-run = "prek install"
+run = "prek install --hook-type pre-commit --hook-type commit-msg"
[tasks."build:cli"]
description = "Build the cli"📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
| [tasks."build:cli"] | ||||||
| description = "Cross-compile the provider binaries into ./dist" | ||||||
| run = "goreleaser release --snapshot --clean" | ||||||
|
|
||||||
| [tasks."build:provider:dev"] | ||||||
| description = "Generate a provider.yaml pointing at local ./dist binaries" | ||||||
| depends = ["build:cli"] | ||||||
| env = { PROJECT_ROOT = "./dist" } | ||||||
| run = "go run ./hack/provider/main.go v0.0.0 > ./dist/provider.yaml" | ||||||
|
|
||||||
| [tasks."build:provider:release"] | ||||||
| description = "Generate a provider.yaml pointing at GitHub release assets" | ||||||
| env = { GITHUB_OWNER = "devsy-org" } | ||||||
| run = ''' | ||||||
| VERSION="$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")" | ||||||
| go run ./hack/provider/main.go "$VERSION" > ./dist/provider.yaml | ||||||
| ''' | ||||||
|
|
||||||
| [tasks.test] | ||||||
| description = "Run unit tests" | ||||||
| run = "go test ./..." | ||||||
|
|
||||||
| [tasks."test:e2e"] | ||||||
| description = "Run no-machine e2e integration tests (macOS; no OrbStack required)" | ||||||
| depends = ["build:cli"] | ||||||
| dir = "e2e" | ||||||
| run = "go test -tags=e2e -v -ginkgo.v -timeout 3600s --ginkgo.label-filter=integration" | ||||||
|
|
||||||
| [tasks."test:e2e:vm"] | ||||||
| description = "Run full machine-lifecycle e2e tests (requires OrbStack)" | ||||||
| depends = ["build:cli"] | ||||||
| dir = "e2e" | ||||||
| run = "go test -tags=e2e -v -ginkgo.v -timeout 3600s --ginkgo.label-filter=vm" | ||||||
|
|
||||||
| [tasks.lint] | ||||||
| description = "Run go vet" | ||||||
| run = "go vet ./..." | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,83 @@ | ||
| #:schema https://www.schemastore.org/prek.json | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/pre-commit/pre-commit-hooks" | ||
| rev = "v6.0.0" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "trailing-whitespace" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "end-of-file-fixer" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "check-yaml" | ||
| args = ["--allow-multiple-documents"] | ||
|
|
||
| [[repos.hooks]] | ||
| id = "check-added-large-files" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "check-merge-conflict" | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/alessandrojcm/commitlint-pre-commit-hook" | ||
| rev = "v9.27.0" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "commitlint" | ||
| stages = ["commit-msg"] | ||
| language_version = "lts" | ||
| additional_dependencies = ["@commitlint/config-conventional"] | ||
| verbose = true | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/shellcheck-py/shellcheck-py" | ||
| rev = "v0.11.0.1" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "shellcheck" | ||
| args = ["-e","SC1091,SC1103,SC2148,SC2034,SC1090,SC1009,SC1054,SC1056,SC1072,SC1073,SC1083,SC2329"] | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/scop/pre-commit-shfmt" | ||
| rev = "v3.12.0-2" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "shfmt" | ||
| args = ["-i","4","-ci","-w"] | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/rhysd/actionlint" | ||
| rev = "v1.7.12" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "actionlint" | ||
| files = "^\\.github/workflows/" | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/gitleaks/gitleaks" | ||
| rev = "v8.30.1" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "gitleaks" | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/commitizen-tools/commitizen" | ||
| rev = "v4.19.2" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "commitizen" | ||
| stages = ["commit-msg"] | ||
|
|
||
| [[repos]] | ||
| repo = "https://github.com/golangci/golangci-lint" | ||
| rev = "v2.15.0" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "golangci-lint" | ||
| language_version = "1.26.9" | ||
|
|
||
| [[repos.hooks]] | ||
| id = "golangci-lint-fmt" | ||
| language_version = "1.26.9" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
Add lockfile entries for supported macOS x64 development.
On macOS x64, locked
mise installcannot install these tools: the committedmise.lockcontains URLs only for Linux x64 and macOS arm64. This blocks the mise setup and build tasks on that platform. Addmacos-x64tolockfile_platformsand regeneratemise.lock. The GoReleaser configuration already builds a macOS x64 binary. (raw.githubusercontent.com)🤖 Prompt for AI Agents