-
Notifications
You must be signed in to change notification settings - Fork 314
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
Add dotenv tests #778
base: main
Are you sure you want to change the base?
Add dotenv tests #778
Conversation
It's failing as expected when run with `nix eval .#tests`
@domenkozar This is very prelimnary, but I just wanted to get something up and working. I'm guessing you want to structure things like Or perhaps it's a positive to have a module not requiring imports that is more pure? Also obviously need to wire this into github actions, not sure if you had plans beyond just calling I also don't know the regex you'd prefer using, but I can attempt to figure out a better one than the one I currently have (which might mean just seeing what python-dotenv does). If you already have one in mind though, I can just use that. |
Looks good, we can refactor once the tests pass 🔥 |
I'm having problems getting the regex to optionally match surrounding single quotes. I'm pretty close though with: https://regex101.com/r/ch9iSw/1
I think the issue is with the optional space matching, followed by optional quote, followed by lazy matching any character. The pattern works on the first one because it knows the beginning of the line I believe. Here is the current one for reference that doesn't handle quotes in regex101: https://regex101.com/r/qgtFkK/1 |
queue thought "what if we mark the end of the line!" Yep, that works: https://regex101.com/r/Tc8L3x/1 |
Nevermind, nix and this regex test differ in result: https://regex101.com/r/DOlw5S/1
|
What's missing here? |
This was high priority for me while I thought I could transition to it at work from docker-compose. However I got stuck on #782, created a reproduction, and ran out of time and had to revert to using docker-compose again. |
It's failing as expected when run with
nix eval .#tests
.This will also soon fix #772