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

Consider moving tests outside of src/ #6

Closed
Wojciechem opened this issue Mar 25, 2021 · 4 comments · Fixed by #8
Closed

Consider moving tests outside of src/ #6

Wojciechem opened this issue Mar 25, 2021 · 4 comments · Fixed by #8
Assignees
Labels
enhancement New feature or request

Comments

@Wojciechem
Copy link

Wojciechem commented Mar 25, 2021

A pretty standard practice for libraries is to have two directories at the root:

  • src/
  • tests/

and include tests only in autoload-dev.

This also allows to exclude tests from "dist" library, using .gitattributes with tests/ export-ignore - making it a bit more lightweight - great for production use.

@michalbiarda
Copy link
Owner

@Wojciechem Thanks for creating first issue in my repo :-). Your suggestion sounds legit. Could you please confirm that you're talking about something like that: https://madewithlove.com/blog/software-engineering/gitattributes/ ?

@michalbiarda michalbiarda self-assigned this Mar 26, 2021
@michalbiarda michalbiarda added the enhancement New feature or request label Mar 26, 2021
michalbiarda added a commit that referenced this issue Mar 27, 2021
@michalbiarda
Copy link
Owner

@Wojciechem I am not an expert on .gitattributes. Could you please review my PR or tell how to properly test this change?

@Wojciechem
Copy link
Author

@michalbiarda Yes, the article summarizes it well.
I'm no expert either, literally used .gitattributes once, just for this use-case :) but yours looks fine.
Github will generate zip archive - "release" for tag, the export-ignored files should not be present - that's it :)

@michalbiarda
Copy link
Owner

Thanks @Wojciechem 👍. I merged it at it worked just fine :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants