Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ cd "$repo_root"
unstaged=$(git diff --name-only --ignore-submodules --)
untracked=$(git ls-files --others --exclude-standard)
if [ -n "$unstaged" ] || [ -n "$untracked" ]; then
printf '%s\n' "pre-commit: the working tree must match the staged snapshot before running task check." >&2
printf '%s\n' "pre-commit: the working tree must match the staged snapshot before running mise run check." >&2
if [ -n "$unstaged" ]; then
printf '%s\n%s\n' "Unstaged files:" "$unstaged" >&2
fi
Expand All @@ -18,10 +18,10 @@ if [ -n "$unstaged" ] || [ -n "$untracked" ]; then
exit 1
fi

if ! command -v task >/dev/null 2>&1; then
printf '%s\n' "pre-commit: go-task is required; install it or run 'git commit --no-verify' to bypass intentionally." >&2
if ! command -v mise >/dev/null 2>&1; then
printf '%s\n' "pre-commit: mise is required; install it or run 'git commit --no-verify' to bypass intentionally." >&2
exit 1
fi

printf '%s\n' "pre-commit: running the PR gate (task check)"
exec task check
printf '%s\n' "pre-commit: running the PR gate (mise run check)"
exec mise run check
196 changes: 62 additions & 134 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# PR-time test gate with native Linux, Windows, macOS, and Go race coverage.
#
# Two PR jobs call the same subtasks used by the local `task check` entrypoint:
# - lint: `task check:static` covers documentation drift, Go vet/gofmt, and
# Two PR jobs call the same subtasks used by the local `mise run check` entrypoint:
# - lint: `mise run check:static` covers documentation drift, Go vet/gofmt, and
# Dashboard lint/format. The whole bundled
# tree (registry/_templates/_web) is gitignored and regenerated
# via `task sync-bundled` + `task sync-web`, both of which run as deps
# of `task vet` — so vet implicitly bootstraps the bundle here.
# - test: `task check:test` builds bin/one then runs Go + Dashboard tests.
# via `mise run sync-bundled` + `mise run sync-web`, both of which run as deps
# of `mise run vet` — so vet implicitly bootstraps the bundle here.
# - test: `mise run check:test` builds bin/one then runs Go + Dashboard tests.
# Build is required because tests/e2e snapshot tests skip when
# bin/one is missing.
# Native Windows, macOS, and Go race jobs also run on every PR. The master
Expand Down Expand Up @@ -36,7 +36,8 @@ permissions:
contents: read

env:
# GitHub-hosted runners are outside China; the default Taskfile proxy
MISE_TASK_CACHE_DIR: ${{ github.workspace }}/.cache/mise-task-artifacts
# GitHub-hosted runners are outside China; the default Go proxy
# (goproxy.cn) is slower/flakier there and has caused CI download failures.
GOPROXY: https://proxy.golang.org,direct
GOTOOLCHAIN: local
Expand All @@ -47,34 +48,18 @@ jobs:
steps:
- uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
- name: Set up mise
uses: jdx/mise-action@v4
with:
go-version-file: packages/cli/go.mod
cache: true
cache-dependency-path: |
go.work
go.work.sum
packages/cli/go.sum
packages/kernel/go.mod

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
# The root packageManager pin drives version selection for every workspace app.
run_install: false
version: 2026.9.7
experimental: true

- name: Set up Node
uses: actions/setup-node@v6
- name: Restore task artifacts
uses: actions/cache@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Set up Task
uses: go-task/setup-task@v2
with:
version: 3.53.1
path: .cache/mise-task-artifacts
key: tasks-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('mise.toml', 'pnpm-lock.yaml', 'packages/cli/go.sum') }}-${{ github.sha }}
restore-keys: tasks-${{ runner.os }}-${{ runner.arch }}-

- name: Download Go modules
run: |
Expand All @@ -101,41 +86,26 @@ jobs:
fi

- name: Run static gate
# Calls the same static subtask as local `task check`.
run: task check:static
# Calls the same static subtask as local `mise run check`.
run: mise run check:static

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
- name: Set up mise
uses: jdx/mise-action@v4
with:
go-version-file: packages/cli/go.mod
cache: true
cache-dependency-path: |
go.work
go.work.sum
packages/cli/go.sum
packages/kernel/go.mod

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
version: 2026.9.7
experimental: true

- name: Set up Task
uses: go-task/setup-task@v2
- name: Restore task artifacts
uses: actions/cache@v4
with:
version: 3.53.1
path: .cache/mise-task-artifacts
key: tasks-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('mise.toml', 'pnpm-lock.yaml', 'packages/cli/go.sum') }}-${{ github.sha }}
restore-keys: tasks-${{ runner.os }}-${{ runner.arch }}-

- name: Download Go modules
run: |
Expand All @@ -162,41 +132,29 @@ jobs:
fi

- name: Run test gate
# Calls the same test subtask as local `task check`.
run: task check:test
# Calls the same test subtask as local `mise run check`.
run: mise run check:test

- name: Build template sources and generated projects
run: mise run check:templates

test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
- name: Set up mise
uses: jdx/mise-action@v4
with:
go-version-file: packages/cli/go.mod
cache: true
cache-dependency-path: |
go.work
go.work.sum
packages/cli/go.sum
packages/kernel/go.mod
version: 2026.9.7
experimental: true

- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Restore task artifacts
uses: actions/cache@v4
with:
run_install: false

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Set up Task
uses: go-task/setup-task@v2
with:
version: 3.53.1
path: .cache/mise-task-artifacts
key: tasks-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('mise.toml', 'pnpm-lock.yaml', 'packages/cli/go.sum') }}-${{ github.sha }}
restore-keys: tasks-${{ runner.os }}-${{ runner.arch }}-

- name: Download Go modules
shell: pwsh
Expand All @@ -208,41 +166,26 @@ jobs:
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

- name: Run native Windows PR gate
run: task check
run: mise run check

test-race:
# Catch Go data races before merging, alongside the other required jobs.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: packages/cli/go.mod
cache: true
cache-dependency-path: |
go.work
go.work.sum
packages/cli/go.sum
packages/kernel/go.mod

- name: Set up pnpm
uses: pnpm/action-setup@v4
- name: Set up mise
uses: jdx/mise-action@v4
with:
run_install: false
version: 2026.9.7
experimental: true

- name: Set up Node
uses: actions/setup-node@v6
- name: Restore task artifacts
uses: actions/cache@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml

- name: Set up Task
uses: go-task/setup-task@v2
with:
version: 3.53.1
path: .cache/mise-task-artifacts
key: tasks-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('mise.toml', 'pnpm-lock.yaml', 'packages/cli/go.sum') }}-${{ github.sha }}
restore-keys: tasks-${{ runner.os }}-${{ runner.arch }}-

- name: Download Go modules
run: |
Expand Down Expand Up @@ -270,41 +213,26 @@ jobs:

- name: Run Go race tests
# test:go builds the CLI for E2E coverage; Dashboard tests run in test.
run: task test:go
run: mise run test:go

test-macos:
# Run before merging so macOS path and process regressions block PRs.
runs-on: macos-latest
steps:
- uses: actions/checkout@v7

- name: Set up Go
uses: actions/setup-go@v7
with:
go-version-file: packages/cli/go.mod
cache: true
cache-dependency-path: |
go.work
go.work.sum
packages/cli/go.sum
packages/kernel/go.mod

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Set up Node
uses: actions/setup-node@v6
- name: Set up mise
uses: jdx/mise-action@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
version: 2026.9.7
experimental: true

- name: Set up Task
uses: go-task/setup-task@v2
- name: Restore task artifacts
uses: actions/cache@v4
with:
version: 3.53.1
path: .cache/mise-task-artifacts
key: tasks-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('mise.toml', 'pnpm-lock.yaml', 'packages/cli/go.sum') }}-${{ github.sha }}
restore-keys: tasks-${{ runner.os }}-${{ runner.arch }}-

- name: Download Go modules
run: |
Expand All @@ -331,4 +259,4 @@ jobs:
fi

- name: Run test gate
run: task check:test
run: mise run check:test
38 changes: 11 additions & 27 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ permissions:
contents: write

env:
MISE_TASK_CACHE_DIR: ${{ github.workspace }}/.cache/mise-task-artifacts
GOPROXY: https://proxy.golang.org,direct
GOTOOLCHAIN: local

Expand Down Expand Up @@ -253,37 +254,20 @@ jobs:
RELEASE_SHA: ${{ steps.release.outputs.sha }}
run: git checkout --detach "$RELEASE_SHA"

- name: Set up Go
- name: Set up mise
if: steps.release.outputs.already_published != 'true'
uses: actions/setup-go@v7
uses: jdx/mise-action@v4
with:
go-version-file: packages/cli/go.mod
cache: true
cache-dependency-path: |
go.work
go.work.sum
packages/cli/go.sum
packages/kernel/go.mod

- name: Set up Task
if: steps.release.outputs.already_published != 'true'
uses: go-task/setup-task@v2
with:
version: 3.53.1

- name: Set up pnpm
if: steps.release.outputs.already_published != 'true'
uses: pnpm/action-setup@v4
with:
run_install: false
version: 2026.9.7
experimental: true

- name: Set up Node
- name: Restore task artifacts
if: steps.release.outputs.already_published != 'true'
uses: actions/setup-node@v6
uses: actions/cache@v4
with:
node-version: 24
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
path: .cache/mise-task-artifacts
key: tasks-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('mise.toml', 'pnpm-lock.yaml', 'packages/cli/go.sum') }}-${{ github.sha }}
restore-keys: tasks-${{ runner.os }}-${{ runner.arch }}-

- name: Download Go modules without mutating the workspace
if: steps.release.outputs.already_published != 'true'
Expand Down Expand Up @@ -313,7 +297,7 @@ jobs:

- name: Run complete release gate
if: steps.release.outputs.already_published != 'true'
run: task pre-push
run: mise run pre-push

- name: Verify release tree is clean
if: steps.release.outputs.already_published != 'true'
Expand Down
Loading
Loading