Skip to content

Allow smoke testing pre-release analytics CLI via Actions variable#1147

Merged
TylerJang27 merged 1 commit into
mainfrom
claude/analytics-cli-pre-release-test-version
Jul 8, 2026
Merged

Allow smoke testing pre-release analytics CLI via Actions variable#1147
TylerJang27 merged 1 commit into
mainfrom
claude/analytics-cli-pre-release-test-version

Conversation

@TylerJang27

Copy link
Copy Markdown
Collaborator

What

Adds an org-wide escape hatch for exercising a specific (e.g. pre-release) analytics CLI build in the test-result uploads, without a code change. Set the ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION Actions variable to a version and every analytics-uploader invocation uses it; set it to latest (the default) and the uploader resolves latest itself.

Mirrors the change in trunk-io/trunk2, trunk-io/trunk, and trunk-io/chimerarepo.

⚠️ Input name: analytics-cli-version (not cli-version)

These composite actions already have a cli-version input, but it means the trunk CLI under test (PLUGINS_TEST_CLI_VERSION) — unrelated to the analytics uploader. To avoid a collision, the new input is named analytics-cli-version.

Why it's threaded through inputs, not vars directly

The uploader lives inside the linter_tests, tool_tests, and action_tests composite actions, and the vars context is not readable inside composite actions. So an analytics-cli-version input (default latest) is added to each, and ${{ vars.ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION }} is passed at every call site. The uploader step forwards it: cli-version: ${{ inputs.analytics-cli-version }}.

Behavior

ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION cli-version used
latest (default) passed to the uploader, which resolves latest itself
e.g. 0.14.0.pre.beta.2 that exact version

These steps previously set no cli-version, so the latest default is behavior-preserving.

Changes

  • .github/actions/{linter_tests,tool_tests,action_tests}/action.yaml — new analytics-cli-version input (default latest); Upload prod results step now sets cli-version: ${{ inputs.analytics-cli-version }}.
  • Call sites (13) pass analytics-cli-version: ${{ vars.ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION }}: pr.yaml (6), nightly.yaml (4), windows_nightly.yaml (2), upload_results.reusable.yaml (1).

Notes / scope

  • Wired at all call sites uniformly, including the Windows jobs (windows_nightly.yaml and the disabled windows_* jobs in pr.yaml). The uploader step is gated runner.os != 'Windows', so those are harmless no-ops today — but consistent and ready if Windows upload is enabled.
  • Out of scope: upload_results.reusable.yaml's trunk upload-linter-versions step is a plugins-specific upload (not the analytics-uploader) and is untouched. The lone Gemfile (linters/brakeman/test_data/) is linter test fixture data, not a CI rspec flow.
  • I could not run trunk check / trunk fmt locally (the sandbox proxy blocks get.trunk.io); edits match existing indentation and were validated with a YAML parser; the repo's Trunk Check on the PR is the verification.

🤖 Generated with Claude Code


Generated by Claude Code

Add an org-wide escape hatch for exercising a specific (e.g. pre-release)
analytics CLI build in CI test uploads without a code change, via the
ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION Actions variable.

The uploader runs inside the linter_tests, tool_tests and action_tests
composite actions, and composite actions cannot read the vars context, so
the version is threaded through a new input (defaulting to "latest") and
supplied as ${{ vars.ANALYTICS_CLI_PRE_RELEASE_TEST_VERSION }} at every
call site. The uploader step passes it through as cli-version; the uploader
action resolves "latest" itself.

The input is named analytics-cli-version (not cli-version) because these
actions already have a cli-version input meaning the trunk CLI under test,
which is unrelated to the analytics uploader's CLI version.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019qcw8v8TiTHRGdDSH7J3ia
@TylerJang27 TylerJang27 merged commit 1f03362 into main Jul 8, 2026
12 checks passed
@TylerJang27 TylerJang27 deleted the claude/analytics-cli-pre-release-test-version branch July 8, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants