Skip to content

add CI: build, test, lint on PRs and main pushes - #4

Merged
somanshreddy merged 1 commit into
mainfrom
03-30-ci_workflow
Mar 30, 2026
Merged

somanshreddy merged 1 commit into
mainfrom
03-30-ci_workflow

Conversation

@somanshreddy

@somanshreddy somanshreddy commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds GitHub Actions CI and PR template for heygen-cli. Six jobs run on every PR and main push, taking inspiration from stripe/stripe-cli and our own experiment-framework CI:

  • test — build + mocked tests on ubuntu, macOS, and Windows (cross-platform matrix from stripe-cli, catches path/permission/line-ending bugs)
  • lint — golangci-lint
  • pr-template — enforces 50+ char PR body (Python script, same pattern as experiment-framework)
  • secrets — gitleaks CLI scan on git history (same install pattern as experiment-framework, free — no org license needed)
  • goreleaser-check — validates .goreleaser.yaml config on PRs (from stripe-cli, catches broken release configs before tag push)

Also adds .github/PULL_REQUEST_TEMPLATE with Description and Testing sections, and fixes deprecated archives.formatarchives.formats in .goreleaser.yaml.

Concurrency group cancels in-progress CI when a branch updates.

Testing

CI self-validates on this PR — all 8 checks pass (3 platform tests + lint + pr-template + secrets + goreleaser-check + WIP).

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@somanshreddy
somanshreddy force-pushed the 03-30-ci_workflow branch 7 times, most recently from 2b6c5e3 to 9a7f8e8 Compare March 30, 2026 19:00
…check

GitHub Actions CI with six jobs:
- test: build + mocked tests on ubuntu, macOS, and windows
- lint: golangci-lint
- pr-template: enforce 50+ char PR description (Python, matches experiment-framework)
- secrets: gitleaks CLI scan (free, no license needed)
- goreleaser-check: validate .goreleaser.yaml config on PRs

Also fixes deprecated archives.format → archives.formats in .goreleaser.yaml.
Concurrency group cancels stale runs on branch updates.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

somanshreddy commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator Author

Merge activity

  • Mar 30, 8:17 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 30, 8:38 PM UTC: Graphite couldn't merge this PR because it failed for an unknown reason (GitHub is reporting that this PR is not mergeable, despite passing required status checks defined by your branch protection rules. Please check your rulesets for additional blocking criteria. Graphite Merge Queue does not currently support rulesets. Please contact Graphite support for further assistance.).
  • Mar 30, 8:59 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 30, 8:59 PM UTC: @somanshreddy merged this pull request with Graphite.

@somanshreddy
somanshreddy merged commit bd1637d into main Mar 30, 2026
9 checks passed
@somanshreddy
somanshreddy deleted the 03-30-ci_workflow branch March 30, 2026 20:59
@somanshreddy somanshreddy added this to the M0: Walking Skeleton milestone Apr 3, 2026
somanshreddy added a commit that referenced this pull request Apr 14, 2026
…25) (#102)

## Description

Better error messages and help text for first-time CLI users, based on PostHog data from the v0.0.4 launch day (Apr 13). None of these were blocking (15/17 auth-error users recovered on their own). All changes are additive hint/wording improvements. No exit codes, output shapes, or control flow changes.

**TTY** = interactive terminal. **Non-TTY** = piped input, script, CI, or coding agent.

### Changes

| # | What | File | Trigger (launch day) |
|---|------|------|----------------------|
| 1 | `auth login` with empty stdin now distinguishes TTY ("type your key") vs non-TTY ("pipe your key or set env var") | `auth_login.go` | 3 installs hit vague error, didn't retry |
| 2 | Unknown subcommands list what's available (`Available subcommands: me`) | `root.go` | 6 installs typed e.g. `heygen user info` |
| 3 | `--wait` timeout reworded from "polling timed out" to "still processing, not failed" | `builder.go` | 11 installs, wording implied failure |
| 4 | `auth status` errors include hint with all 3 auth methods + key URL | `auth_status.go` | 17 installs got unhelpful auth error |
| 5 | `heygen auth --help` explains all auth options (was just "Manage authentication") | `auth.go` | Consistent with #4 |
| 6 | `avatar_not_found` / `video_not_found` errors hint at the corresponding `list` command | `errors.go` | 8 installs retried wrong avatar IDs |

Auth guidance text is defined once in `auth.go` (`authGuidance` constant) and referenced everywhere.

Cold-start "no API key found" errors (from `chain_resolver.go`) are enriched with the same guidance in `context.go`, scoped to the cold-start case only (doesn't clobber the broken-credentials-file hint).

### What we chose NOT to do

- **Don't auto-persist env var to disk** on `auth login` empty stdin. `cat /dev/null | heygen auth login` would silently succeed, masking broken automation.
- **Don't bump the 20-min `--wait` default.** Only 4/11 timeouts hit it; the other 7 set shorter `--timeout` themselves.

## Testing

- 12 new + 2 updated tests
- `make test` and `make build` pass
- Manually verified: `heygen user info`, `heygen auth --help`, `heygen auth status --help`, empty-stdin `auth login`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants