Xline
Xline copied to clipboard
[Refactor] refactor Xline ci process
The following code snippet is taken from our pull_request.yml
...
jobs:
test:
...
strategy:
fail-fast: true
matrix:
config:
- {
name: "Normal",
args: "",
rustflags: "",
test: "llvm-cov nextest --all-features --workspace --codecov --output-path codecov.info",
}
- {
name: "Madsim",
args: "--package=simulation",
rustflags: "--cfg madsim",
test: "nextest run --package=simulation",
}
name: Tests ${{ matrix.config.name }}
steps:
...
- name: Clippy ${{ matrix.config.name }}
env:
RUSTFLAGS: ${{ matrix.config.rustflags }}
run: cargo clippy ${{ matrix.config.args }} --all-targets --all-features -- -D warnings
....
- name: Test ${{ matrix.config.name }}
env:
RUSTFLAGS: ${{ matrix.config.rustflags }}
run: cargo ${{ matrix.config.test }}
....
As you can see, the usage of matrix.config.args
in "Clippy ${{ matrix.config.name }}" and "Test ${{ matrix.config.name }}" is different. We can do some refactor staff to make them uniform.