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

feat: add unit test rule to core/api buck file #3372

Merged
merged 5 commits into from
Nov 20, 2023
Merged

feat: add unit test rule to core/api buck file #3372

merged 5 commits into from
Nov 20, 2023

Conversation

vindard
Copy link
Contributor

@vindard vindard commented Oct 17, 2023

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.

@github-actions github-actions bot added the core label Oct 17, 2023
@vindard vindard marked this pull request as draft October 17, 2023 18:43
@vindard vindard marked this pull request as ready for review October 17, 2023 18:57
core/api/package.json Outdated Show resolved Hide resolved
else:
return arg
cmd = f'jq -n env'
Copy link
Member

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...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done here: 6eac574

@github-actions github-actions bot added the ci label Nov 17, 2023
@vindard vindard requested a review from bodymindarts November 17, 2023 15:35
name = "unit-tests",
srcs = [":src"] + [":test_src"] + glob([".env", "galoy.yaml"]),
config_file = "test/unit/jest.config.js",
env_file = ".env",
Copy link
Member

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.

@vindard vindard merged commit 70893de into main Nov 20, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants