@@ -34,6 +34,7 @@ struct BuildConfigRaw {
3434 timeout : Option <String >,
3535 env_file : Option <String >,
3636 env : Option <HashMap <String , String >>,
37+ working_dir : Option <String >,
3738}
3839
3940struct RunConfigRaw {
@@ -60,6 +61,7 @@ struct JobConfig {
6061 enabled : Option <bool >,
6162 env_file : Option <String >,
6263 env : Option <HashMap <String , String >>,
64+ working_dir : Option <String >,
6365 webhook : Vec <WebhookConfig >,
6466}
6567
@@ -69,6 +71,7 @@ struct BuildConfig {
6971 timeout : Duration , // Timeout for build (defaults to run.timeout)
7072 env_file : Option <String >, // From build.env_file
7173 env : Option <HashMap <String , String >>, // From build.env
74+ working_dir : Option <String >, // build.working_dir || job.working_dir
7275}
7376
7477struct Job {
@@ -80,7 +83,7 @@ struct Job {
8083 timeout : Duration , // From run.timeout
8184 concurrency : Concurrency ,
8285 retry : Option <RetryConfig >,
83- working_dir : Option <String >, // From run.working_dir
86+ working_dir : Option <String >, // run.working_dir || job .working_dir
8487 log_file : Option <String >, // From log.file
8588 log_max_size : u64 , // From log.max_size
8689 env_file : Option <String >, // Job-level (shared by build & run)
@@ -133,6 +136,7 @@ jobs:
133136 build : # Optional: build configuration
134137 sh : cargo build # Build command (runs in build/ directory)
135138 timeout : 30m # Optional: timeout for build (defaults to run.timeout)
139+ working_dir : ./subdir # Optional: working directory (relative to build dir)
136140 run : # Run configuration
137141 sh : ./target/debug/app # Run command (runs in run/ directory)
138142 timeout : 10s # Optional (default: 1h)
@@ -146,6 +150,7 @@ jobs:
146150 log : # Optional: logging configuration
147151 file : output.log # File path for stdout/stderr
148152 max_size : 10M # Max size before rotation (default: 10M)
153+ working_dir : ./subdir # Optional: working directory for build & run (can be overridden)
149154 env_file : .env # Optional: load env vars from file (relative to job dir)
150155 env : # Optional: inline env vars
151156 KEY : value
@@ -169,6 +174,15 @@ jobs:
169174- ` build/ ` is a git worktree - gitignored files (build artifacts) are preserved between syncs
170175- ` run/ ` is copied from ` build/ ` after successful build (excludes ` .git ` )
171176
177+ ## Toolchain
178+
179+ [ mise] ( https://mise.jdx.dev/ ) manages the Rust toolchain version (Rust 1.85).
180+
181+ ``` bash
182+ mise exec -- cargo build # Run cargo with mise-managed Rust
183+ mise exec -- cargo test # Run tests
184+ ```
185+
172186## Assumptions
173187
1741881 . ** Git available** : ` git ` command must be in PATH
@@ -303,9 +317,9 @@ host ENV < runner.env_file < runner.env < job.env_file < job.env < run.env_file
303317## Testing
304318
305319```bash
306- cargo test # Run all tests
307- cargo run -- --help # Check CLI
308- cargo run -- . -i 10 # Test with local repo
320+ mise exec -- cargo test # Run all tests
321+ mise exec -- cargo run -- --help # Check CLI
322+ mise exec -- cargo run -- . -i 10 # Test with local repo
309323```
310324
311325## Common Modifications
0 commit comments