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

fix: teardown test build directories #597

Merged
merged 6 commits into from
Dec 2, 2023

Conversation

harlan-zw
Copy link
Contributor

@harlan-zw harlan-zw commented Dec 2, 2023

Review this first: #596

Issue

Test build dirs will just keep stacking up. There is no logic in place to remove them.

This isn't ideal, especially when your IDE tries to index these files (even though they're ignored - phpstorm 😠)

image

Solution

This PR includes a few important fixes:

  • group test builds in a test directory so they can easily be cleaned up manually, this may be needed if a test fails/is force quit
  • mark the build directory that's created as a side effect and clean it up once the tests are finished

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

This is much needed, thank you!

What about calling it teardown or cleanup? sideEffects doesn't entirely communicate to me that these will run after the test finishes

@harlan-zw harlan-zw changed the title fix: build dirs never cleaned up fix: teardown test build directories Dec 2, 2023
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

❤️

@danielroe danielroe merged commit 8a82ce6 into main Dec 2, 2023
3 checks passed
@danielroe danielroe deleted the fix/avoid-excessive-test-build-dirs branch December 2, 2023 09:21
@danielroe danielroe mentioned this pull request Dec 2, 2023
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.

None yet

2 participants