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

ci: Add missing environment variable to integration-test #641

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

simonjbeaumont
Copy link
Collaborator

@simonjbeaumont simonjbeaumont commented Oct 2, 2024

Motivation

When we migrated the CI to Github Actions we lost an important configuration for the integration test that makes sure we're using the copy of this repo from the PR, rather than cloning from upstream. This can be seen in the logs of recent PR jobs:

** Cloning https://github.com/apple/swift-openapi-generator to /tmp/run-integration-test.sh.SUVBe45RMQ/swift-openapi-generator
Cloning into '/tmp/run-integration-test.sh.SUVBe45RMQ/swift-openapi-generator'...
** Extracting name for Swift package: /__w/swift-openapi-generator/swift-openapi-generator
** Overriding dependency in /tmp/run-integration-test.sh.SUVBe45RMQ/swift-openapi-generator/IntegrationTest on swift-openapi-generator to use /__w/swift-openapi-generator/swift-openapi-generator

This used to be specified in the Docker Compose file as an environment variable but dropped off during migration.

Modifications

Add the environment variable back to use file://${GITHUB_WORKSPACE} for the clone.

Note that one cannot use the env: map when making use of a reusable GitHub workflow with uses: so it's been added in the command passed to the matrix job, itself.

Result

The integration test CI will use this repo for the test itself so we can make sure we're testing the right thing.

Test Plan

The logs on this PR job show that we're now cloning from the GitHub workspace:

** Cloning file:///__w/swift-openapi-generator/swift-openapi-generator to /tmp/run-integration-test.sh.OWgemDungm/swift-openapi-generator
Cloning into '/tmp/run-integration-test.sh.OWgemDungm/swift-openapi-generator'...
Note: switching to '9664e9cb2170a5fa8a1bad3266891d4b4248e6ba'.
...
** Extracting name for Swift package: /__w/swift-openapi-generator/swift-openapi-generator
** Overriding dependency in /tmp/run-integration-test.sh.OWgemDungm/swift-openapi-generator/IntegrationTest on swift-openapi-generator to use /__w/swift-openapi-generator/swift-openapi-generator

@simonjbeaumont simonjbeaumont force-pushed the sb/missing-ci-config branch 2 times, most recently from 50efb28 to 2312177 Compare October 2, 2024 09:51
@simonjbeaumont simonjbeaumont marked this pull request as ready for review October 2, 2024 10:06
@simonjbeaumont simonjbeaumont enabled auto-merge (squash) October 2, 2024 10:08
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.

Thanks for spotting and fixing this! 🙏

@simonjbeaumont simonjbeaumont merged commit 89d49d2 into apple:main Oct 2, 2024
24 checks passed
@czechboy0 czechboy0 added the semver/none No version bump required. label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/none No version bump required.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants