From 8c9fea7488a7e9bab2fe6da56551ef9003cbd8d1 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Sun, 18 Oct 2026 23:14:23 -0600 Subject: [PATCH 1/4] ci: migrate hook configuration to prek and mise --- .github/workflows/pre-commit.yaml | 4 +- .pre-commit-config.yaml | 52 ------------------- mise.lock | 67 ++++++++++++++++++++++++ mise.toml | 43 ++++++++++++++++ prek.toml | 84 +++++++++++++++++++++++++++++++ 5 files changed, 197 insertions(+), 53 deletions(-) delete mode 100644 .pre-commit-config.yaml create mode 100644 mise.lock create mode 100644 mise.toml create mode 100644 prek.toml diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index bfa5c73..d206a13 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -15,4 +15,6 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 - - uses: j178/prek-action@af4d4fcb6922b8e6f65c0426947125fcc38794ce # v3.0.2 + - uses: jdx/mise-action@9b200bcecbfd6303e69a4a261b2e09e3757440a7 # v5 + + - run: prek run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 221e7d3..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,52 +0,0 @@ -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - args: ["--allow-multiple-documents"] - - id: check-added-large-files - - id: check-merge-conflict - - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.27.0 - hooks: - - id: commitlint - stages: [commit-msg] - language_version: lts - additional_dependencies: - - "@commitlint/config-conventional" - verbose: true - - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.11.0.1 - hooks: - - id: shellcheck - args: - [ - "-e", - "SC1091,SC1103,SC2148,SC2034,SC1090,SC1009,SC1054,SC1056,SC1072,SC1073,SC1083,SC2329", - ] - - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.12.0-2 - hooks: - - id: shfmt - args: ["-i", "4", "-ci", "-w"] - - repo: https://github.com/rhysd/actionlint - rev: v1.7.12 - hooks: - - id: actionlint - files: '^\.github/workflows/' - - repo: https://github.com/gitleaks/gitleaks - rev: v8.30.1 - hooks: - - id: gitleaks - - repo: https://github.com/commitizen-tools/commitizen - rev: v4.19.2 - hooks: - - id: commitizen - stages: [commit-msg] - - repo: https://github.com/golangci/golangci-lint - rev: v2.15.0 - hooks: - - id: golangci-lint - - id: golangci-lint-fmt diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..a87c601 --- /dev/null +++ b/mise.lock @@ -0,0 +1,67 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +lockfile_version = 3 + +[[tools.go]] +version = "1.26.8" +backend = "core:go" +specifiers = ["1.26.8"] + +[tools.go."platforms.linux-x64"] +checksum = "sha256:d0f743b33e8d8945e6b1f432edd15785c70507121d6e2a723b21285eddf8b57b" +url = "https://dl.google.com/go/go1.26.8.linux-amd64.tar.gz" + +[tools.go."platforms.macos-arm64"] +checksum = "sha256:a012b25b571bd0138a03dcd25375ceba866fe5ca822f426d2c66a4de56fd3f4b" +url = "https://dl.google.com/go/go1.26.8.darwin-arm64.tar.gz" + +[[tools.golangci-lint]] +version = "2.15.0" +backend = "aqua:golangci/golangci-lint" +specifiers = ["2.15.0"] + +[tools.golangci-lint."platforms.linux-x64"] +checksum = "sha256:9b7fe6a6bf6334b98decf8d86b11415ea7889afdabdd1959fdce23af2a9ebcea" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.15.0/golangci-lint-2.15.0-linux-amd64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/647132535" +provenance = "github-attestations" + +[tools.golangci-lint."platforms.macos-arm64"] +checksum = "sha256:d1e409481a8ca846c4bc97e781eb5cb1bd5c23353a0b3977a1cbda1b1b6447d5" +url = "https://github.com/golangci/golangci-lint/releases/download/v2.15.0/golangci-lint-2.15.0-darwin-arm64.tar.gz" +url_api = "https://api.github.com/repos/golangci/golangci-lint/releases/assets/647132534" +provenance = "github-attestations" + +[[tools.goreleaser]] +version = "2.18.3" +backend = "aqua:goreleaser/goreleaser" +specifiers = ["2.18.3"] + +[tools.goreleaser."platforms.linux-x64"] +checksum = "sha256:b8dee4728bca1aba0d71a832a17cd0a3799f75372878e7ffa36aef2343bce0bc" +url = "https://github.com/goreleaser/goreleaser/releases/download/v2.18.3/goreleaser_Linux_x86_64.tar.gz" +url_api = "https://api.github.com/repos/goreleaser/goreleaser/releases/assets/623773318" +provenance = "github-attestations" + +[tools.goreleaser."platforms.macos-arm64"] +checksum = "sha256:156f425536d40ce282b79c637ca00eb943792de6ad1e2482a4b21cc4b5421f4f" +url = "https://github.com/goreleaser/goreleaser/releases/download/v2.18.3/goreleaser_Darwin_all.tar.gz" +url_api = "https://api.github.com/repos/goreleaser/goreleaser/releases/assets/623773494" +provenance = "github-attestations" + +[[tools.prek]] +version = "0.5.5" +backend = "aqua:j178/prek" +specifiers = ["0.5.5"] + +[tools.prek."platforms.linux-x64"] +checksum = "sha256:5470e4aa0fc0ad9d3de7dfaf088fb746d59c2eda3b173c06418e7c8861a520eb" +url = "https://github.com/j178/prek/releases/download/v0.5.5/prek-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/611684555" +provenance = "github-attestations" + +[tools.prek."platforms.macos-arm64"] +checksum = "sha256:e4bc3132023b50020e62b073bc3147082828bf250d8b9282850c6f2bed5471b6" +url = "https://github.com/j178/prek/releases/download/v0.5.5/prek-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/j178/prek/releases/assets/611684483" +provenance = "github-attestations" diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..e63b564 --- /dev/null +++ b/mise.toml @@ -0,0 +1,43 @@ +[settings] +experimental = true +lockfile = true +lockfile_platforms = ["linux-x64", "macos-arm64"] + +[tool_config] +locked = true + +[tools] +go = "1.26.8" +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" + +[tasks."build:cli"] +description = "Build the cli" +run = "goreleaser release --snapshot --clean" + +[tasks."build:provider:dev"] +description = "Build provider.yaml for local development" +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 = "Build provider.yaml for GitHub release" +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 +''' diff --git a/prek.toml b/prek.toml new file mode 100644 index 0000000..aefe36c --- /dev/null +++ b/prek.toml @@ -0,0 +1,84 @@ +#: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.8" + +[[repos.hooks]] +id = "golangci-lint-fmt" +language_version = "1.26.8" + From 9d98ff6ecebaca326cc976d76115352bfa3f6365 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Sun, 18 Oct 2026 23:24:53 -0600 Subject: [PATCH 2/4] build: move Taskfile tasks into mise --- Taskfile.yml | 43 ------------------------------------------- mise.toml | 26 +++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 46 deletions(-) delete mode 100644 Taskfile.yml diff --git a/Taskfile.yml b/Taskfile.yml deleted file mode 100644 index 05846e0..0000000 --- a/Taskfile.yml +++ /dev/null @@ -1,43 +0,0 @@ -version: "3" - -tasks: - build:cli: - desc: Cross-compile the provider binaries into ./dist - cmds: - - goreleaser release --snapshot --clean - - build:provider:dev: - desc: Generate a provider.yaml pointing at local ./dist binaries - deps: ["build:cli"] - env: - PROJECT_ROOT: ./dist - cmd: go run ./hack/provider/main.go v0.0.0 > ./dist/provider.yaml - - build:provider:release: - desc: Generate a provider.yaml pointing at GitHub release assets - env: - GITHUB_OWNER: devsy-org - cmd: go run ./hack/provider/main.go {{ .VERSION }} > ./dist/provider.yaml - vars: - VERSION: - sh: git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0" - - test: - desc: Run unit tests - cmd: go test ./... - - test:e2e: - desc: Run no-machine e2e integration tests (macOS; no OrbStack required) - deps: ["build:cli"] - dir: e2e - cmd: go test -tags=e2e -v -ginkgo.v -timeout 3600s --ginkgo.label-filter=integration - - test:e2e:vm: - desc: Run full machine-lifecycle e2e tests (requires OrbStack) - deps: ["build:cli"] - dir: e2e - cmd: go test -tags=e2e -v -ginkgo.v -timeout 3600s --ginkgo.label-filter=vm - - lint: - desc: Run go vet - cmd: go vet ./... diff --git a/mise.toml b/mise.toml index e63b564..5a465af 100644 --- a/mise.toml +++ b/mise.toml @@ -25,19 +25,39 @@ description = "Install prek git hooks" run = "prek install" [tasks."build:cli"] -description = "Build the cli" +description = "Cross-compile the provider binaries into ./dist" run = "goreleaser release --snapshot --clean" [tasks."build:provider:dev"] -description = "Build provider.yaml for local development" +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 = "Build provider.yaml for GitHub 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 ./..." From b05bb54a12db2b6135668320945f1eb81053a227 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Sun, 18 Oct 2026 23:59:28 -0600 Subject: [PATCH 3/4] style: normalize prek config newline --- prek.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/prek.toml b/prek.toml index aefe36c..3437c38 100644 --- a/prek.toml +++ b/prek.toml @@ -81,4 +81,3 @@ language_version = "1.26.8" [[repos.hooks]] id = "golangci-lint-fmt" language_version = "1.26.8" - From 22717a51e7022b13b89ed48a5076f56a5a7299c9 Mon Sep 17 00:00:00 2001 From: Samuel K Date: Mon, 19 Oct 2026 00:42:32 -0600 Subject: [PATCH 4/4] build: align toolchain with current Go version --- mise.lock | 12 ++++++------ mise.toml | 2 +- prek.toml | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mise.lock b/mise.lock index a87c601..a4c410d 100644 --- a/mise.lock +++ b/mise.lock @@ -3,17 +3,17 @@ lockfile_version = 3 [[tools.go]] -version = "1.26.8" +version = "1.26.9" backend = "core:go" -specifiers = ["1.26.8"] +specifiers = ["1.26.9"] [tools.go."platforms.linux-x64"] -checksum = "sha256:d0f743b33e8d8945e6b1f432edd15785c70507121d6e2a723b21285eddf8b57b" -url = "https://dl.google.com/go/go1.26.8.linux-amd64.tar.gz" +checksum = "sha256:42d158b4d8f7b61ac0a830567c940a86098fb7aac52e467a5ebec03ef5cc2f8d" +url = "https://dl.google.com/go/go1.26.9.linux-amd64.tar.gz" [tools.go."platforms.macos-arm64"] -checksum = "sha256:a012b25b571bd0138a03dcd25375ceba866fe5ca822f426d2c66a4de56fd3f4b" -url = "https://dl.google.com/go/go1.26.8.darwin-arm64.tar.gz" +checksum = "sha256:f9bb7c0a02506c5d9bf0d1eb1f7ee6c7684f844ae49558308a0427b830e022cc" +url = "https://dl.google.com/go/go1.26.9.darwin-arm64.tar.gz" [[tools.golangci-lint]] version = "2.15.0" diff --git a/mise.toml b/mise.toml index 5a465af..aa4cf17 100644 --- a/mise.toml +++ b/mise.toml @@ -7,7 +7,7 @@ lockfile_platforms = ["linux-x64", "macos-arm64"] locked = true [tools] -go = "1.26.8" +go = "1.26.9" golangci-lint = "2.15.0" goreleaser = "2.18.3" prek = "0.5.5" diff --git a/prek.toml b/prek.toml index 3437c38..a59109b 100644 --- a/prek.toml +++ b/prek.toml @@ -76,8 +76,8 @@ rev = "v2.15.0" [[repos.hooks]] id = "golangci-lint" -language_version = "1.26.8" +language_version = "1.26.9" [[repos.hooks]] id = "golangci-lint-fmt" -language_version = "1.26.8" +language_version = "1.26.9"