Skip to content

ci: Run the Flagsmith SDK behavioural spec - #237

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

khvn26 merged 5 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.

  • sdk-spec/Steps.java: the steps file. It has one static method per SDK step, each marked with the Gherkin step text as a comment. It holds only SDK calls and the mapping to the spec's flag shape, so it doubles as a working usage example:

    // When the application gets the environment flags
    static List<SpecFlag> getEnvironmentFlags(FlagsmithClient flagsmith)
        throws FlagsmithClientError {
      return asSpecFlags(flagsmith.getEnvironmentFlags());
    }
  • sdk-spec/Dockerfile: builds the SDK from source with Maven, then compiles the steps file together with the spec's Java harness, which comes from the harness build context. The harness finds the marked methods and runs them for the runner over stdin and stdout. No build file is needed in sdk-spec/, and nothing outside src/ is part of the published artefacts.

  • .github/workflows/sdk-spec.yml: calls the spec's reusable workflow with language: java. 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:49
@khvn26 khvn26 added the hackathon Hackathon work label Oct 21, 2026
@khvn26
khvn26 merged commit 18281fc into main Oct 21, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hackathon Hackathon work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants