Skip to content

Add integration test CI check #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

simonjbeaumont
Copy link
Collaborator

Motivation

We want to make sure that we don't unknowingly introduce changes in the runtime
that break the generator, which relies on its SPI.

We have an package in a subdirectory in the generator repo that we can be used
as an integration test to gate changes to the various repos in Swift OpenAPI
project, including the runtime package.

The generator repo also contains a script that can be used to clone the
integration test package and use swift package edit to override a dependency
to check it still functions with the proposed changes.

Modifications

  • Bring in the run-integraton-test.sh script from the generator repo.
  • Run this script as part of the soundness pipeline.

Result

On each pull request, the integration test package will be built with the
changes proposed in the pull request.

Test Plan

The CI pipeline for this PR will run the integration test because it's been
added to the soundness script, which is run as part of an existing CI pipeline.

I have also validated this locally:

docker-compose -f docker/docker-compose.yaml run --build
soundness
...
** Running /code/scripts/run-integration-test.sh...
...
** Extracting name for Swift package: /code
** Overriding dependency in /code/tmp.run-integration-test.sh.uyS9Hf8siA.noindex/swift-openapi-generator/IntegrationTest on swift-openapi-runtime to use /code
...
Build complete! (42.53s)
** ✅ Successfully built integration test package.
** ✅ All soundness check(s) passed.

Notes

This PR adds the integration test to the soundness script, but we probably want
to split this out into its own pipeline in the future.

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.

2 participants