Skip to content

ci: Run the Flagsmith SDK behavioural spec - #263

Merged
khvn26 merged 8 commits into
mainfrom
feat/sdk-spec
Oct 21, 2026
Merged

khvn26 merged 8 commits into
mainfrom
feat/sdk-spec

Conversation

@khvn26

@khvn26 khvn26 commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

Runs the Flagsmith SDK behavioural spec against this SDK on every pull request and push to main.

# When the application gets the environment flags
def get_environment_flags(flagsmith: Flagsmith) -> list[SpecFlag]:
    return as_spec_flags(flagsmith.get_environment_flags())
  • sdk-spec/steps.py: one function per SDK step, marked with the Gherkin step text as a comment. It contains only SDK calls and the mapping to the spec's flag shape, so it doubles as a working usage example. It is typed, so mypy --strict . covers it.
  • sdk-spec/Dockerfile: builds the SDK from source and runs the steps file under the spec's Python harness, taken from the harness build context. The harness speaks JSON lines over stdin/stdout, so this repo contains no protocol code.
  • .github/workflows/sdk-spec.yml: calls the spec's reusable workflow with language: python. The workflow starts a real Flagsmith instance, seeds it through the Admin API and runs the scenarios against the SDK image. It is pinned to v0.3.0.
  • renovate.json: bumps the uses: ref and spec-ref together.

The spec currently covers getting environment flags and getting identity flags with traits.

@khvn26
khvn26 requested a review from a team as a code owner October 21, 2026 10:31
@khvn26
khvn26 requested review from emyller and removed request for a team October 21, 2026 10:31
talissoncosta
talissoncosta previously approved these changes Oct 21, 2026
@talissoncosta
talissoncosta self-requested a review October 21, 2026 10:45
@khvn26
khvn26 merged commit adddf47 into main Oct 21, 2026
10 checks passed
@khvn26
khvn26 deleted the feat/sdk-spec branch October 21, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants