CI: move formatting related jobs in its own config #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Global configuration for formatting related jobs | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
jobs: | |
run_rust_formatting: | |
name: Formatting Rust related code | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust_toolchain_version: ["nightly"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Use shared Rust toolchain setting up steps | |
uses: ./.github/actions/toolchain-shared | |
with: | |
rust_toolchain_version: ${{ matrix.rust_toolchain_version }} | |
- name: Run cargo fmt | |
run: | | |
make format | |
- name: Install cargo-sort | |
run: cargo install cargo-sort | |
- name: Check Cargo.toml Sorting | |
run: cargo sort --check |