Skip to content
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

Build IntegrationTest package as part of CI pipeline #56

Merged

Conversation

simonjbeaumont
Copy link
Collaborator

@simonjbeaumont simonjbeaumont commented Jun 8, 2023

Motivation

We have an package in a subdirectory in this 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.

This will likely be implemented by shallow cloning this repo in the pull
request pipelines of other projects and running a script, using swift package edit to override the dependency on the package being tested, and building the
integration test package.

Modifications

  • Simplify the integration test package location and name.
  • Add a CI script that runs the integration test with a package override.
  • 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/check-for-broken-symlinks.sh...
** Checking for broken symlinks...
** ✅ Found 0 symlinks.
** Running /code/scripts/check-for-unacceptable-language.sh...
** Checking for unacceptable language...
** ✅ Found no unacceptable language.
** Running /code/scripts/check-license-headers.sh...
** ✅ Found no files with missing license header.
** Running /code/scripts/run-swift-format.sh...
** ✅ Ran swift-format with no errors.
** Running /code/scripts/check-for-docc-warnings.sh...
...
** ✅ Generated documentation with no warnings.
** Running /code/scripts/run-integration-test.sh...
** Checking required executables...
...
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.

@simonjbeaumont simonjbeaumont added area/testing Improvements to tests. semver/none No version bump required. kind/enhancement Improvements to existing feature. labels Jun 8, 2023
@simonjbeaumont simonjbeaumont force-pushed the sb-make-integration-test-ci-ready branch from 97dfd65 to 70d062b Compare June 8, 2023 22:14
@simonjbeaumont simonjbeaumont marked this pull request as ready for review June 8, 2023 22:22
@simonjbeaumont simonjbeaumont changed the title Move integration test package and update package name Build IntegrationTest package as part of CI pipeline Jun 8, 2023
Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

Looks great, thank you @simonjbeaumont. Added one suggestion, otherwise you can land this. Up to you whether we land this as part of soundness now, or wait for the dedicated CI pipeline, either order is fine with me.

Signed-off-by: Si Beaumont <[email protected]>
Copy link
Collaborator Author

@simonjbeaumont simonjbeaumont left a comment

Choose a reason for hiding this comment

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

Thanks @czechboy0.

Up to you whether we land this as part of soundness now, or wait for the dedicated CI pipeline, either order is fine with me.

If we land this in stages we can get the benefit now. After this PR it will be working. We can then add another pipeline and then remove it from soundness.

scripts/run-integration-test.sh Outdated Show resolved Hide resolved
@simonjbeaumont simonjbeaumont requested a review from czechboy0 June 9, 2023 08:55
Copy link
Contributor

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

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

:shipit:

@simonjbeaumont simonjbeaumont merged commit 37255b7 into apple:main Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing Improvements to tests. kind/enhancement Improvements to existing feature. semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants