FirelyTeam / firely-cql-sdk

BSD 3-Clause "New" or "Revised" License
28 stars 16 forks source link

Better integration between `CQL SDK` and `Integration Tests` #440

Closed baseTwo closed 1 month ago

baseTwo commented 1 month ago

The Firely CQL SDK and the Firely CQL Integration Test Runner are two separate repos.

For the most part this is fine, since the Integration Test Runner includes the CQL SDK via NuGet packages.

However, to properly debug failing tests, it is desirable to step through the generated C# demo libraries. Currently these demo projects are included in the CQL SDK repo. They may move to a separate repo in the future.

A second requirement is that the integration tests must be run as part of every PR in the CQL SDK. (see link to successor issue below)

A folder structure is required so that the Integration Test Runner may include project references to the CQL SDK and the Demo projects which will have consistent relative paths no matter who checks out the repos on their local environment.

Two ways exists to do this, Git submodules or Git subtrees. See my notes on submodules/subtrees: https://firely.atlassian.net/wiki/x/EAD5Yg. Also should the Integration Test Runner be a submodule of the CQL SDK, or the other way around?

Since the CQL SDK is the main repo, it was chose that the Integration Test Runner would be a submodule into the CQL SDK repo. A submodule is not automatically retrieved when the main repo is cloned, and for most developers on the CQL SDK, they would not need the Integration Test Runner. It is however beneficial for the build pipeline of the CQL SDK to have submodule access to the Integration Test Runner, so that when the Demo projects are rebuild, the Integration Test can run on each PR in the CQL SDK.

An alterative which could also be considered if this workflow doesn't work well, is to have the CQL SDK as a submodule/subtree in the Integration Test Runner. The Integration Test Runner would have to be NuGet packaged and then included and run on a PR for the CQL SDK.

Successor Issue : #428

baseTwo commented 1 month ago

Added wiki page https://firely.atlassian.net/wiki/x/EAD5Yg