Running cargo commands in a subdirectory?
See original GitHub issueDo the checklist before filing an issue:
- Is this related to the
actions-rs
Actions? If you think it’s a problem related to Github Actions in general, use GitHub Community forum instead: https://github.community - You’ve read the Contributing section about feature requests: https://github.com/actions-rs/.github/blob/master/CONTRIBUTING.md#feature-requests
- Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
Motivation
My understanding is this github action only supports running cargo commands from the root of the repo. Is it possible to run cargo commands from a subdirectory? The motivation is that I have a monorepo that has projects that use different languages. I’d like to run cargo commands only for the rust projects.
Additional context
I’ve tried to set “working-directory” at the top level but that didn’t seem to work.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:63
- Comments:9
Top Results From Across the Web
Run cargo command in subdirectories with user-specified ...
I want to create a zsh script that'll run from the rust directory, and for each subdirectory with a Cargo.toml file, run cargo...
Read more >How do I test a code in a sub-sub-directory? - Stack Overflow
One way would be to create tests/tests.rs with the following contents: mod foo { mod foo; // this will include `tests/foo/foo.rs` }.
Read more >How to run Cargo in a nested folder - Raul Melo
How to run Cargo in a nested folder. This article was published on Apr ... You're in root level and wants to run...
Read more >cargo-generate - crates.io: Rust Package Registry
cargo -generate is a developer tool to help you get up and running quickly ... the specific subfolder in the git repository may...
Read more >Chapter 2. Cargo Red Hat Developer Tools 1
To create a Rust program on the command line, run the cargo tool as follows: ... Cargo.toml and a subdirectory src containing a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This works around this issue. Nevertheless I think this is a bug.
I also expected this to use
As the working directory for where
cargo run
is run