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

Python tests in justfile with nix #331

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

jaoleal
Copy link
Contributor

@jaoleal jaoleal commented Jan 6, 2025

This piece of changes tries to automate our python tests inside our justfile.

test-int now just executes "poetry run poe tests" command defined in pyproject.toml and in run_tests.py.

the old test-int is renamed to test-wkspc to match better the internal command and to give space for the integration tests with python.

new command test-int-nix uses a nix-shell to setup every python crap, downloading and compiling utreexod and florestad, run the tests and exits

@jaoleal
Copy link
Contributor Author

jaoleal commented Jan 6, 2025

Still isnt ready to merge because im getting a strange behavior with the tests being executed by just and nix

@jaoleal jaoleal force-pushed the tests_on_justfile branch 2 times, most recently from e8cda76 to 34a3814 Compare January 7, 2025 17:03
@jaoleal
Copy link
Contributor Author

jaoleal commented Jan 7, 2025

@Davidson-Souza This error from actions is happening because i had to change the way that add_node_settings calls floresta. I removed the cargo dependency and thats solved the issue with the connection being refused by floresta.
Now the florestad package thats being called by the nix script its building the package using our nix derivation(build.nix).

Seeing your interest in increasing our use of nix in this repo(supposed by #335 ), the problem can be solved by using only nix to setup and run the tests inside functional.yml.

@Davidson-Souza
Copy link
Collaborator

Seeing your interest in increasing our use of nix in this repo(supposed by #335 ), the problem can be solved by using only nix to setup and run the tests inside functional.yml.

I don't want to tie our development to nix (I don't use nix). It's cool for specific things like #335, but I wouldn't make it a requirement for development.

@jaoleal
Copy link
Contributor Author

jaoleal commented Jan 10, 2025

@Davidson-Souza what did you think of the solution of f025e0e and 0f79c64 ?

prepare.sh verifies and setup things while checking dependencies

run.sh uses only things that prepare.sh builded and touched.

This avoids a user that has florestad installed in their $PATH not conflict with the tests that hes doing and also removes the cargo dependencie while calling floresta in our framework without changing it too much.

This makes it able to run inside nix without too much trouble... the deterministic builds of #335 will thank this change

@Davidson-Souza
Copy link
Collaborator

@Davidson-Souza what did you think of the solution of f025e0e and 0f79c64 ?

Seems ok, I concept ACK this (haven't tested yet)

@jaoleal
Copy link
Contributor Author

jaoleal commented Jan 13, 2025

dont merge, just triggering actions.

@jaoleal jaoleal force-pushed the tests_on_justfile branch 4 times, most recently from 9698040 to 8be5a2c Compare January 13, 2025 17:45
@jaoleal
Copy link
Contributor Author

jaoleal commented Jan 13, 2025

It works! Ready to merge.

Copy link
Collaborator

@Davidson-Souza Davidson-Souza left a comment

Choose a reason for hiding this comment

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

Concept ACK. I just have a few small requests before we can merge

tests/run.sh Outdated Show resolved Hide resolved
tests/prepare.sh Outdated Show resolved Hide resolved
tests/prepare.sh Outdated Show resolved Hide resolved
tests/run.sh Outdated Show resolved Hide resolved
justfile Show resolved Hide resolved
justfile Outdated Show resolved Hide resolved
@jaoleal
Copy link
Contributor Author

jaoleal commented Jan 14, 2025

Applied suggestions by @Davidson-Souza

@Davidson-Souza
Copy link
Collaborator

@jaoleal on 75e2a93 test-int-setup is still duplicate

@jaoleal
Copy link
Contributor Author

jaoleal commented Jan 14, 2025

oh, sorry

@Davidson-Souza Davidson-Souza merged commit ee49346 into vinteumorg:master Jan 15, 2025
6 checks passed
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.

2 participants