You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/03/20 04:49:16 UTC

[GitHub] [arrow-datafusion] liukun4515 commented on a change in pull request #2033: use cargo-tomlfmt to check Cargo.toml formatting in CI

liukun4515 commented on a change in pull request #2033:
URL: https://github.com/apache/arrow-datafusion/pull/2033#discussion_r830559057



##########
File path: .github/workflows/rust.yml
##########
@@ -432,6 +432,72 @@ jobs:
         env:
           CARGO_HOME: "/github/home/.cargo"
           CARGO_TARGET_DIR: "/github/home/target"
+
+  cargo-toml-formatting-checks:
+    name: Check Cargo.toml formatting
+    needs: [linux-build-lib]
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        arch: [amd64]
+        rust: [stable]
+    container:
+      image: ${{ matrix.arch }}/rust
+      env:
+        # Disable full debug symbol generation to speed up CI build and keep memory down
+        # "1" means line tables only, which is useful for panic tracebacks.
+        RUSTFLAGS: "-C debuginfo=1"
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: true
+      - name: Cache Cargo
+        uses: actions/cache@v2
+        with:
+          path: /github/home/.cargo
+          # this key equals the ones on `linux-build-lib` for re-use
+          key: cargo-cache-
+      - name: Cache Rust dependencies
+        uses: actions/cache@v2
+        with:
+          path: /github/home/target
+          # this key equals the ones on `linux-build-lib` for re-use
+          key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}
+      - name: Setup Rust toolchain
+        run: |
+          rustup toolchain install ${{ matrix.rust }}
+          rustup default ${{ matrix.rust }}
+      - name: Install cargo-tomlfmt
+        run: |
+          which cargo-tomlfmt || cargo install cargo-tomlfmt
+        env:
+          CARGO_HOME: "/github/home/.cargo"
+          CARGO_TARGET_DIR: "/github/home/target"
+      - name: Check Cargo.toml formatting
+        run: |
+          # if you encounter error, try rerun the command below, finally run 'git diff' to
+          # check which Cargo.toml introduces formatting violation
+          cargo tomlfmt -p Cargo.toml
+          cargo tomlfmt -p datafusion-cli/Cargo.toml
+          cargo tomlfmt -p ballista/rust/core/Cargo.toml
+          cargo tomlfmt -p ballista/rust/scheduler/Cargo.toml
+          cargo tomlfmt -p ballista/rust/executor/Cargo.toml
+          cargo tomlfmt -p ballista/rust/client/Cargo.toml
+          cargo tomlfmt -p datafusion/Cargo.toml
+          cargo tomlfmt -p datafusion/fuzz-utils/Cargo.toml
+          cargo tomlfmt -p ballista-examples/Cargo.toml
+          cargo tomlfmt -p datafusion-examples/Cargo.toml
+          cargo tomlfmt -p datafusion-expr/Cargo.toml
+          cargo tomlfmt -p datafusion-physical-expr/Cargo.toml
+          cargo tomlfmt -p benchmarks/Cargo.toml
+          cargo tomlfmt -p datafusion-common/Cargo.toml
+          cargo tomlfmt -p datafusion-proto/Cargo.toml
+          cargo tomlfmt -p datafusion-jit/Cargo.toml

Review comment:
       good point




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org