From 3291825dee8ea11af5fd17fe5d348953ea4a88af Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Tue, 22 Feb 2022 16:46:38 -0500 Subject: [PATCH] Add `cargo fmt` test to lint CI Formatting should be enforced the same ways as clippy, added it as a linting step. --- .github/workflows/test.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 38b592905..3f58d0bce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: name: ci result runs-on: ubuntu-latest needs: - - clippy + - lint - geo_types - geo - geo_postgis @@ -35,14 +35,14 @@ jobs: if: "!success()" run: exit 1 - clippy: - name: clippy + lint: + name: lint runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, '[skip ci]')" strategy: matrix: container_image: - # Use the latest stable clippy. No need for older versions. + # Use the latest stable version. No need for older versions. - "georust/geo-ci:rust-1.58" container: image: ${{ matrix.container_image }} @@ -50,6 +50,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - run: rustup component add clippy + - run: cargo fmt --all -- --check - run: cargo clippy --all-features --all-targets -- -Dwarnings geo_types: