-
Notifications
You must be signed in to change notification settings - Fork 145
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
feat: add unit test rule to core/api buck file #3372
Conversation
c4b12a6
to
4c70f1e
Compare
4c70f1e
to
4d899af
Compare
else: | ||
return arg | ||
cmd = f'jq -n env' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer if we could do this in python only...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done here: 6eac574
4d899af
to
834312c
Compare
834312c
to
d22327d
Compare
d22327d
to
6eac574
Compare
name = "unit-tests", | ||
srcs = [":src"] + [":test_src"] + glob([".env", "galoy.yaml"]), | ||
config_file = "test/unit/jest.config.js", | ||
env_file = ".env", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to bring this into the file instead of relying on the on disk state like in the Tiltfile.
Ideally we would be able to delete all the .env files and rely on environment defined in code. I don't know if that's feasible yet - we can merge as is to not mess with the existing workflow - but I think that should be the goal once legacy workflows are entirely deprecated.
Description
This PR adds unit tests to buck with the caveat that unit tests currently have a dependency on env variables and the correct ones must be brought in via a
.env
file.This requirement can probably be refactored out in future.