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

copy 'test' dir only in TEST stage #213

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

copy 'test' dir only in TEST stage #213

wants to merge 5 commits into from

Conversation

turadg
Copy link
Member

@turadg turadg commented Jan 14, 2025

Closes: #115

image building process

This omits test* from non-test images. Presumably no other stages depend on "test*" files. CI passing here is evidence of that in the a3p images. If any are affected in downsteam repos we can correct them.

@turadg turadg marked this pull request as ready for review January 14, 2025 21:12
@@ -97,7 +100,7 @@ FROM ghcr.io/agoric/agoric-sdk:${sdkImageTag} as execute-${proposalName}
WORKDIR /usr/src/upgrade-test-scripts

# base is a fresh sdk image so set up the proposal and its dependencies
COPY --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
COPY --exclude=test* --link --chmod=755 ./proposals/${path} /usr/src/proposals/${path}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused by this. in agoric-3-proposals/proposals/*, we generally don't have test code segregated into test/ directories. Will this change catch files named test.sh and foo-test.js? Are we expecting to make test/ subdirectories in most proposals?

Copy link
Member Author

@turadg turadg Jan 14, 2025

Choose a reason for hiding this comment

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

we generally don't have test code segregated into test/ directories

True. To gain the benefits of this change those proposals will have to do the segregation. But it's moot for proposals in this repo as we don't iterate on those tests. The value is in agoric-sdk/a3p-integration/proposals.

Will this change catch files named test.sh and foo-test.js?

Good question. This glob gets test.sh but not foo-test.js. I expected Ava tests (in which 'test' does not lead the filename) to go in a test folder. We could glob more but have to be careful. *test* would exclude files that aren't necessarily for testing, like greatest.

If we want to be really safe we could --exclude=test --exclude=test.*. Oh, and --exclude=*.test.* should be safe and cover Ava test files (assuming the Ava default glob).

Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out the Crabble build uses Ava to execute its eval. That's not a good design but is an example of a "test*" that is needed before test stage.

I'm trying now with the multiple globs.

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.

invalidate stage builds only by the files they use
2 participants