fix(cli): resolve symlink paths in workspace checks and create output #106
Workflow file for this run
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
| # PR-time test gate. Keeps the merge path fast while preserving slower | |
| # compatibility checks on master/manual runs. | |
| # | |
| # 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 | |
| # 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. | |
| # Build is required because tests/e2e snapshot tests skip when | |
| # bin/one is missing. Race + macOS checks run on master/manual triggers only. | |
| # | |
| # Both jobs need Node + pnpm because sync-web runs `pnpm install` + | |
| # `vite build` against apps/dashboard/. | |
| # | |
| # Runners: | |
| # - ubuntu-latest for the main PR checks | |
| # - windows-latest for native Windows build and test coverage | |
| # - macos-latest for master/manual compatibility checks | |
| name: Code Quality and Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| env: | |
| # GitHub-hosted runners are outside China; the default Taskfile proxy | |
| # (goproxy.cn) is slower/flakier there and has caused CI download failures. | |
| GOPROXY: https://proxy.golang.org,direct | |
| GOTOOLCHAIN: local | |
| jobs: | |
| lint: | |
| 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 | |
| with: | |
| # The root packageManager pin drives version selection for every workspace app. | |
| 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 | |
| - name: Download Go modules | |
| run: | | |
| GOWORK=off go -C packages/kernel mod download | |
| GOWORK=off go -C packages/cli mod download | |
| - name: Verify dependency metadata is clean | |
| run: | | |
| set -euo pipefail | |
| dependency_files=( | |
| go.work | |
| go.work.sum | |
| packages/kernel/go.mod | |
| packages/kernel/go.sum | |
| packages/cli/go.mod | |
| packages/cli/go.sum | |
| ) | |
| changes="$(git status --short -- "${dependency_files[@]}")" | |
| if [[ -n "$changes" ]]; then | |
| echo "Dependency setup changed dependency metadata." >&2 | |
| printf '%s\n' "$changes" >&2 | |
| git diff -- "${dependency_files[@]}" | |
| exit 1 | |
| fi | |
| - name: Run static gate | |
| # Calls the same static subtask as local `task check`. | |
| run: task check:static | |
| test: | |
| 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 | |
| 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 | |
| - name: Download Go modules | |
| run: | | |
| GOWORK=off go -C packages/kernel mod download | |
| GOWORK=off go -C packages/cli mod download | |
| - name: Verify dependency metadata is clean | |
| run: | | |
| set -euo pipefail | |
| dependency_files=( | |
| go.work | |
| go.work.sum | |
| packages/kernel/go.mod | |
| packages/kernel/go.sum | |
| packages/cli/go.mod | |
| packages/cli/go.sum | |
| ) | |
| changes="$(git status --short -- "${dependency_files[@]}")" | |
| if [[ -n "$changes" ]]; then | |
| echo "Dependency setup changed dependency metadata." >&2 | |
| printf '%s\n' "$changes" >&2 | |
| git diff -- "${dependency_files[@]}" | |
| exit 1 | |
| fi | |
| - name: Run test gate | |
| # Calls the same test subtask as local `task check`. | |
| run: task check:test | |
| test-windows: | |
| runs-on: windows-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 | |
| 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 | |
| - name: Download Go modules | |
| shell: pwsh | |
| run: | | |
| $env:GOWORK = "off" | |
| go -C packages/kernel mod download | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| go -C packages/cli mod download | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| - name: Run native Windows PR gate | |
| run: task check | |
| test-race: | |
| # Race tests are useful but slow on GitHub-hosted runners. Keep them off | |
| # the PR critical path and run them before/after merging to master. | |
| if: github.event_name != 'pull_request' | |
| 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 | |
| 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 | |
| - name: Download Go modules | |
| run: | | |
| GOWORK=off go -C packages/kernel mod download | |
| GOWORK=off go -C packages/cli mod download | |
| - name: Verify dependency metadata is clean | |
| run: | | |
| set -euo pipefail | |
| dependency_files=( | |
| go.work | |
| go.work.sum | |
| packages/kernel/go.mod | |
| packages/kernel/go.sum | |
| packages/cli/go.mod | |
| packages/cli/go.sum | |
| ) | |
| changes="$(git status --short -- "${dependency_files[@]}")" | |
| if [[ -n "$changes" ]]; then | |
| echo "Dependency setup changed dependency metadata." >&2 | |
| printf '%s\n' "$changes" >&2 | |
| git diff -- "${dependency_files[@]}" | |
| exit 1 | |
| fi | |
| - name: Build binary | |
| run: task build | |
| - name: Run tests | |
| run: task test | |
| test-macos: | |
| # macOS runners are slower to start and are scarce on PRs. Keep the | |
| # cross-platform signal for master/manual runs without making every PR wait. | |
| if: github.event_name != 'pull_request' | |
| 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 | |
| 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 | |
| - name: Download Go modules | |
| run: | | |
| GOWORK=off go -C packages/kernel mod download | |
| GOWORK=off go -C packages/cli mod download | |
| - name: Verify dependency metadata is clean | |
| run: | | |
| set -euo pipefail | |
| dependency_files=( | |
| go.work | |
| go.work.sum | |
| packages/kernel/go.mod | |
| packages/kernel/go.sum | |
| packages/cli/go.mod | |
| packages/cli/go.sum | |
| ) | |
| changes="$(git status --short -- "${dependency_files[@]}")" | |
| if [[ -n "$changes" ]]; then | |
| echo "Dependency setup changed dependency metadata." >&2 | |
| printf '%s\n' "$changes" >&2 | |
| git diff -- "${dependency_files[@]}" | |
| exit 1 | |
| fi | |
| - name: Run test gate | |
| run: task check:test |