Skip to content

Fix CI silently skipping the integration test suite - #603

Merged
xperiandri merged 4 commits into
devfrom
fix/integration-tests-ci
Sep 15, 2026
Merged

xperiandri merged 4 commits into
devfrom
fix/integration-tests-ci

Conversation

@xperiandri

Copy link
Copy Markdown
Collaborator

CI has been building FSharp.Data.GraphQL.slnx and running only the unit tests. FSharp.Data.GraphQL.Integration.slnx (which contains IntegrationTests/IntegrationTests.Server) is never restored or built, so UpdateIntrospectionFile's dotnet test --no-build runs against a project without an imported test SDK: it prints "Build succeeded" and exits 0 without running anything. That silent no-op let two real breaks sit on dev unnoticed:

Changes

Verification

Ran the full BuildAndTest FAKE pipeline from a clean worktree on SDK 10.0.303 (matching CI): Build, RunUnitTests (601 tests), BuildIntegrationTests, UpdateIntrospectionFile (2 tests), RunIntegrationTests (103 tests) all succeeded, producing three separate .trx files. Also verified the negative case: with the integration project deliberately left unbuilt, UpdateIntrospectionFile now fails with "produced no test results ... Was the project restored and built?" instead of silently exiting 0.

Notes for review

🤖 Generated with Claude Code

xperiandri and others added 4 commits September 15, 2026 17:48
…ownload, and add PR preview publishing (#570)

Restore the indentation of IntrospectionUpdateTests.fs

The file was re-indented so that `task { ... }` bodies became offside
(`let options` stayed at the outer column while the surrounding lines
moved in). Both SDK 10.0.303 and 10.0.401 reject it with FS0010/FS0058,
so the integration test project has not compiled since. CI stayed green
only because it never built the project.

The original change was whitespace-only, so this restores the previous
version of the file verbatim.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ownload, and add PR preview publishing (#570)

Build the integration tests before running them, fail on empty runs

`UpdateIntrospectionFile` switched to `dotnet test --no-build`, but
nothing restores or builds FSharp.Data.GraphQL.Integration.slnx: the
restore target only covers `src/**` and the build target only builds
FSharp.Data.GraphQL.slnx. On an unrestored project the test SDK props
are not imported, so `dotnet test` runs nothing and exits with 0. The
step has been a silent no-op on CI, which let a non-compiling
integration test project stay green.

- Add a `BuildIntegrationTests` target that builds the integration
  solution after `Build` (it needs the client provider assembly).
- Make `runTests` fail when the run leaves no results file, deleting a
  stale one first so an earlier run cannot mask it.
- Reuse `runTests` for `UpdateIntrospectionFile` instead of repeating
  the `dotnet test` options, with its own results file name so it does
  not overwrite other runs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ionFactory` and remove external server orchestration from build (#564)

Run the whole integration test suite again

The migration to in-process hosts dropped the `RunIntegrationTests`
target and left only `UpdateIntrospectionFile`, which filters to
`IntrospectionUpdateTests`. The client provider, operation error and
reserved scalar tests have not been run by the build pipeline since.

Restore a `RunIntegrationTests` target after `UpdateIntrospectionFile`
that runs every other integration test into its own results file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
SwapiLocalProviderTests and SwapiRemoteProviderTests both instantiate
`GraphQLProvider<"introspection.json">` and both declare inline
operations named `Q` and `M`. With the F# compiler from SDK 10.0.3xx,
which CI is pinned to, a clean build of the integration tests then fails
with FS0193 ("type ...Operations.Q.OperationResult is not compatible
with type ...Operations.Q.OperationResult"). SDK 10.0.401 compiles it,
and reverting FSharp.TypeProviders.SDK to 8.1.0 does not help, so this
is a compiler issue rather than a change in this repository. It went
unnoticed because CI stopped building the integration tests.

Rename the remote operations to `RemoteQ` and `RemoteM`.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The pipeline now builds and executes all test suites while reliably detecting silent test-run failures.

Pull request overview

Restores reliable CI coverage for the integration test suite and prevents silent no-op test runs.

Changes:

  • Builds and runs integration tests in the FAKE pipeline.
  • Fails test runs that produce no TRX results.
  • Fixes test indentation and provider operation-name collisions.
File summaries
File Description
build/Program.fs Adds integration build/test targets and result validation.
tests/FSharp.Data.GraphQL.IntegrationTests/IntrospectionUpdateTests.fs Restores valid F# indentation.
tests/FSharp.Data.GraphQL.IntegrationTests/SwapiRemoteProviderTests.fs Uses unique generated operation names.
Review details
  • Files reviewed: 2/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown

Test Results

    9 files      9 suites   11m 15s ⏱️
  706 tests   701 ✅  5 💤 0 ❌
2 118 runs  2 103 ✅ 15 💤 0 ❌

Results for commit bdada17.

@xperiandri
xperiandri merged commit 414d542 into dev Sep 15, 2026
6 checks passed
@xperiandri
xperiandri deleted the fix/integration-tests-ci branch September 15, 2026 17:08
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.

3 participants