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

Cannot find binary during cargo test in CI #131

Closed
joepio opened this issue Aug 13, 2021 · 2 comments
Closed

Cannot find binary during cargo test in CI #131

joepio opened this issue Aug 13, 2021 · 2 comments

Comments

@joepio
Copy link

joepio commented Aug 13, 2021

Hi there! Thanks for creating this. The cargo_bin command works great locally, but when I run this in my CI on github actions, it seems like the binary in target/debug/appname cannot be found.

thread 'test::get_fail' panicked at 'called `Result::unwrap()` on an `Err` value: CargoError { cause: Some(NotFoundError { path: "/home/runner/work/atomic-data-rust/atomic-data-rust/target/debug/atomic-cli" }) }', cli/src/main.rs:330:69
@joepio joepio changed the title Cannot find binary during testing Cannot find binary during cargo test in CI Aug 13, 2021
@epage
Copy link
Contributor

epage commented Aug 13, 2021

It only works from tests in the tests/ folder (ie black box / "integration" tests) and not from src/ (ie white box / "unit" tests).

See limitations

The only reason its working locally is because it is using the binary from your last build/test run and not the current one.

@epage epage closed this as completed Aug 13, 2021
@joepio
Copy link
Author

joepio commented Aug 13, 2021

Thanks, that fixed it!

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

No branches or pull requests

2 participants