Skip to content

ci: Run the Flagsmith SDK behavioural spec - #202

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.cs: one static method 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 CI-checked usage example:

    // When the application gets the environment flags
    public static async Task<IEnumerable<object>> GetEnvironmentFlags(FlagsmithClient flagsmith) =>
        AsSpecFlags(await flagsmith.GetEnvironmentFlags());
  • sdk-spec/Dockerfile: builds the SDK from source and compiles the steps file with the spec's .NET harness, which supplies the project file. No .csproj lives in this repository, and nothing in sdk-spec/ is in the solution or the NuGet package.

  • .github/workflows/sdk-spec.yml: calls the spec's reusable workflow with language: dotnet. 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.

Note: the SDK exposes every flag value as a string (IFlag.Value), so 42 becomes "42" and true becomes "true". The steps file restores numbers and booleans, which means a string value such as "42" cannot be told apart from a number.

@khvn26
khvn26 requested a review from a team as a code owner October 21, 2026 10:51
@khvn26
khvn26 requested review from emyller and removed request for a team October 21, 2026 10:51
@khvn26 khvn26 added the hackathon Hackathon work label Oct 21, 2026
@khvn26
khvn26 merged commit 7ce0c90 into main Oct 21, 2026
29 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