Skip to content

Commit

Permalink
Add cargo fmt test to lint CI
Browse files Browse the repository at this point in the history
Formatting should be enforced the same ways as clippy,
added it as a linting step.
  • Loading branch information
nyurik committed Feb 22, 2022
1 parent 87dd612 commit 3291825
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
name: ci result
runs-on: ubuntu-latest
needs:
- clippy
- lint
- geo_types
- geo
- geo_postgis
Expand All @@ -35,21 +35,22 @@ 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 }}
steps:
- 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:
Expand Down

0 comments on commit 3291825

Please sign in to comment.