Skip to content

ci: gate workflow on PRs to main, bump codecov-action to v5 - #1

Merged
visgotti merged 10 commits into
mainfrom
dev
May 1, 2026
Merged

visgotti merged 10 commits into
mainfrom
dev

Conversation

@visgotti

@visgotti visgotti commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Restrict CI triggers to `pull_request` events targeting `main` (drop `push` and `workflow_dispatch`).
  • Bump `codecov/codecov-action` from v4 → v5. `CODECOV_TOKEN` is wired in via repo secrets.

Heads-up: e2e job is now unreachable

The `e2e` job is gated by `if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'` (originally to avoid exposing provider secrets to fork PRs). With those triggers removed, the condition can never be true, so e2e will not run on this workflow anymore.

Pick one in a follow-up:

  • Drop the `if:` so e2e runs on every PR (acceptable here since the repo doesn't accept fork PRs).
  • Restore a `workflow_dispatch:` trigger so e2e can be run on demand.
  • Remove the e2e job entirely.

Test plan

  • PR opened against `main` triggers the `lint`, `unit-tests` (Node 18/20/22/24), and `build` jobs.
  • Coverage from the Node 24 leg uploads to Codecov successfully (badge populates).
  • No workflow run is triggered on direct push to `main`.

🤖 Generated with Claude Code

visgotti and others added 4 commits April 28, 2026 03:38
Export 41 resource classes and their associated types as part of the public SDK
surface. Resources can now be imported directly for advanced use cases like
creating custom clients or accessing resource methods independently.

Also expand the request API to use structured InternalRequestParams, improving
type safety and reducing coupling between resources and client internals. Export
RequestBodyKind, InternalRequestParams, and RawRequestFn for advanced use cases.

455 tests passing, all metrics > 90% coverage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Codecov:
- Add codecov.yml with 90% project target, 80% patch target
- Update jest.config.ts to generate lcov coverage reports
- Update .github/workflows/ci.yml to upload coverage to Codecov on Node 24
- Add Codecov badge to README

GitHub Actions:
- Update lint and build jobs to use Node 24 (latest stable)
- Add Node 24 to unit-test matrix (now tests 18, 20, 22, 24)
- Configure coverage upload only on Node 24 (single source of truth)

Documentation:
- Add Codecov coverage badge alongside CI/E2E badges
- Add 9 new practical examples to README:
  * Embeddings with dimensional output
  * Image generation and editing
  * Audio (TTS, transcription, translation) with multipart uploads
  * Rerank with query and relevance scoring
  * Typed model strings (AnthropicModel, OpenAIModel, etc.) with IDE autocomplete
  * Vector stores with file upload and search
  * Spend tracking and observability (logs, global aggregates, cache hits)
  * Cache management (health checks, flushAll, settings)
  * Compliance and audit logging

455 tests passing, 99%+ coverage maintained.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
Restrict CI to pull_request events targeting main and upgrade
codecov/codecov-action from v4 to v5.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the push/workflow_dispatch gate on the e2e job so the full live-
provider matrix runs on every PR alongside lint/unit/build.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Rename LiteLLMProxyClient → LiteLLMClient (and LiteLLMProxyError →
LiteLLMError) across the public surface. Adds resource modules and
typed responses for the remaining LiteLLM admin/passthrough endpoints
(audit, claude_code, cloudzero, vantage, discovery, email_events,
projects, scim, settings, unified access groups, interactions,
openai_passthrough, fallbacks, jwt, callbacks, policies, prompts,
public, router_settings, tools, pass_through_config, access_groups).

Replace the live-only e2e workflow with a single in-repo suite that
runs against an isolated docker-compose proxy stack. Tests gate
Enterprise-only features behind LITELLM_LICENSE and use shared
expectShape / expectTypedError helpers.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Print the first 8 lines of each test's failureMessages alongside the
test name so CI logs are actionable without re-running locally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Each matrix leg only forwards a single provider's key. Tests that hit
real OpenAI/Anthropic/Gemini endpoints now skip when their key isn't
set instead of asserting on a guessed proxy-error status.

- openai_apis: containers/realtime/evals.list need OPENAI_API_KEY
- vector_stores: OpenAI-shape create + nested files paths
- misc: usageAiChat (OpenAI-backed)
- parity_additions: client.interactions.retrieve (Gemini-backed)
- native: anthropic.countTokens, anthropic.skills.list, gemini.*

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Drop the per-provider key isolation in the matrix env block — every
leg now gets every *_API_KEY from secrets. Revert the it.skip gating
added in the prior commit; tests that hit live OpenAI/Anthropic/Gemini
endpoints run on every leg again.

Negative-path branches in native.e2e.test.ts now assert the actual
proxy status (500 for live calls, success for the local count_tokens
path) instead of the wrong 401 from before — they're dead code with
all keys forwarded but documented correctly for any future no-key run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Every matrix leg now gets every *_API_KEY, so the HAS_X-gated alias
form was unreachable code. Inline plain `describe(...)` calls keep the
suite obvious — there are no provider-gated skips anywhere in CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Live API tests (containers list, gemini streaming, etc.) periodically
return transient 5xx / drop streams. Add jest.retryTimes(2) to the
files that hit real upstream providers so a single flake doesn't fail
the run; genuine bugs still surface after three attempts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@visgotti
visgotti merged commit 705f9fc into main May 1, 2026
11 checks passed
visgotti added a commit that referenced this pull request May 2, 2026
Resolves trivial conflicts from PR #1's squash merge — keeps dev's
ci.yml (push trigger + publish job), 1.0.1 version, and the deletion
of the standalone publish.yml.

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

This branch was previously deployed

1 inactive deployment
live — c4e68eb7 Deployed May 1, 2026 by visgotti via e2e (alibaba) #11
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.

1 participant