Updates to the release Github Action workflow to add an integration-test job which builds the CLI, runs generate commands and compares them to the golden_generated files in ./codegen, and then finally builds a project with grafana-app-sdk project generate and makes sure it compiles to ensure no regressions. This should allow us to catch any problems which exist in the CLI codegen process, which is not (and can't be) unit tested. If integration tests fail, the release is not created.
Along the way of writing these improvements, I discovered a few bugs in project generation with model types (as opposed to API resource types). I made some minor changes to fix them as well so the workflow would pass. I also added a few additional golden_generated test files that were missing as they were not unit tested.
I did this work on a fork so that I could do workflow testing without worrying about releases, you can see the latest run of the workflow on the fork here, or go back through the history to see failure examples.
Updates to the release Github Action workflow to add an
integration-test
job which builds the CLI, runsgenerate
commands and compares them to the golden_generated files in./codegen
, and then finally builds a project withgrafana-app-sdk project generate
and makes sure it compiles to ensure no regressions. This should allow us to catch any problems which exist in the CLI codegen process, which is not (and can't be) unit tested. If integration tests fail, the release is not created.Along the way of writing these improvements, I discovered a few bugs in project generation with model types (as opposed to API resource types). I made some minor changes to fix them as well so the workflow would pass. I also added a few additional golden_generated test files that were missing as they were not unit tested.
I did this work on a fork so that I could do workflow testing without worrying about releases, you can see the latest run of the workflow on the fork here, or go back through the history to see failure examples.