feat: add standalone "Test examples" CI step and complete documentation coverage - #3
Merged
Merged
Conversation
Align the client with the updated client requirements: - CI: add a standalone `Test examples` step that actually runs the documentation example code end-to-end (each of the 7 example programs is executed via `go run ./examples/<name>` against the live API, guarded by the APIFY_TOKEN secret). The `Integration tests` step now skips the example/doc-snippet tests so they run only in the dedicated step. - Docs: add tests/docs_snippets_test.go, which extracts every fenced Go block from README.md and docs/*.md, asserts gofmt formatting, and compiles each snippet against the module. Fixed the formatting/compile issues it surfaced and made the custom-transport snippet a complete program. - Docs: document field/type/meaning for every public option struct and response model used by the README quick start and examples, and state the closed enums definitively (run/build status, webhook event types, version source types, etc.), verified against the OpenAPI spec. - Bump version to 0.2.1 and record the change in CHANGELOG.md.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings the Go client into compliance with the updated client requirements (documentation/examples). This is a CI/docs compliance change only — the client is already at OpenAPI spec
v2-2026-06-18T095846Z, so there is no spec bump and no public-interface change.Changes
Test examplesCI step —.github/workflows/go-integration-tests.ymlnow has a step named exactlyTest examplesthat actually runs the documentation example code: each of the 7 example programs is executed end-to-end viago run ./examples/<name>against the live API, guarded by theAPIFY_TOKENsecret. TheIntegration testsstep now skips the example/doc-snippet tests (-skip '^(TestExample|TestDocSnippets)') so they run only in the dedicated step. Triggers extended todocs/**andREADME.md.tests/docs_snippets_test.go, which extracts every fenced Go block fromREADME.mdanddocs/*.md, asserts each is gofmt-formatted, and compiles each against the module. Fixed the real formatting/compile issues it surfaced and turned the custom-HTTP-transport README snippet into a complete, compilable program.ActorJobStatus— corrected an incomplete list,WebhookEventType,VersionSourceType,SourceCodeFileFormat, pricing/response-format/permission/ownership), each verified value-by-value against the OpenAPI spec.0.2.0→0.2.1and recorded the change inCHANGELOG.md.Verification
gofmt -l .,go vet ./...,go build ./...clean.Test examplesstep passes: the doc-snippet checks plus all 7 example programs run end-to-end.Generated by Claude Code