Is your feature request related to a problem or challenge?
Part of #21048
Follows-up: #24083
Describe the solution you'd like
#24083 introduces xtask to implement individual test commands, including setup steps such as environment variables. This allows both local and CI runs to use the same commands, making local reproduction easier and ensuring it is equivalent to CI.
See the issue write-up for how it works. It is essentially just a simple binary within the project; xtask is the conventional name for this pattern.
For example, the default test run command is:
|
cargo llvm-cov \ |
|
--profile ci \ |
|
--exclude datafusion-examples \ |
|
--exclude ffi_example_table_provider \ |
|
--exclude datafusion-cli \ |
|
--workspace \ |
|
--lib \ |
|
--tests \ |
|
--bins \ |
|
--features serde,avro,json,backtrace,integration-tests,parquet_encryption,substrait \ |
|
--codecov \ |
|
--output-path target/codecov.json |
Now both ci and local run can be executed with
# Use `cargo xtask help` for the full usage
# syntax: cargo xtask ci step [step-name] [extra-args]
> cargo xtask ci step test workspace
(...run tests)
# Use 'explain' to show the underlying command
> cargo xtask ci step test workspace --explain
cd /Users/yongting/Code/datafusion2/datafusion-ci-steps-xtask && \
cargo llvm-cov \
--profile ci \
--exclude datafusion-examples \
--exclude ffi_example_table_provider \
--exclude datafusion-cli \
--workspace \
--lib \
--tests \
--bins \
--features serde,avro,json,backtrace,integration-tests,parquet_encryption,substrait \
--codecov \
--output-path target/codecov.json
Next steps:
Using this rust workflow as reference, it is organized as:
workflow(entire file) -> job (several commands) -> step (command)
Link: https://github.com/apache/datafusion/blob/main/.github/workflows/rust.yml
Describe alternatives you've considered
No response
Additional context
No response
Is your feature request related to a problem or challenge?
Part of #21048
Follows-up: #24083
Describe the solution you'd like
#24083 introduces
xtaskto implement individual test commands, including setup steps such as environment variables. This allows both local and CI runs to use the same commands, making local reproduction easier and ensuring it is equivalent to CI.See the issue write-up for how it works. It is essentially just a simple binary within the project;
xtaskis the conventional name for this pattern.For example, the default test run command is:
datafusion/.github/workflows/rust.yml
Lines 324 to 335 in 26fbf4d
Now both ci and local run can be executed with
Next steps:
Using this
rustworkflow as reference, it is organized as:workflow(entire file) -> job (several commands) -> step (command)Link: https://github.com/apache/datafusion/blob/main/.github/workflows/rust.yml
xtaskorchestration for CI jobs/workflows, such ascargo xtask ci job rust, to simplify reproducing the full CI job/workflows locally.rust.ymlworkflow so it is easy to reproduce locally.Describe alternatives you've considered
No response
Additional context
No response