From 26f5db3aaee0d3bcf4adf65a9a729b2e426c283c Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Thu, 24 Feb 2022 13:53:20 -0500 Subject: [PATCH] Fix bench build bug, added CI lints In order to auto-catch bugs and code quality, adding clippy and fmt to CI (same as geo) --- .github/workflows/test.yml | 7 +++++-- benches/parse.rs | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 770d08085..bf2b3b29c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,10 @@ jobs: toolchain: stable profile: minimal override: true - components: rustfmt, rust-src + components: rustfmt, clippy, rust-src - name: Checkout repository uses: actions/checkout@v2 - - run: cargo test --all-features && cargo test --no-default-features + - run: cargo fmt --all -- --check + - run: cargo clippy --all-features --all-targets -- -Dwarnings + - run: cargo test --all-features + - run: cargo test --no-default-features diff --git a/benches/parse.rs b/benches/parse.rs index b1f0edde1..58da45680 100644 --- a/benches/parse.rs +++ b/benches/parse.rs @@ -2,6 +2,8 @@ extern crate criterion; extern crate wkt; +use std::str::FromStr; + fn criterion_benchmark(c: &mut criterion::Criterion) { c.bench_function("parse small", |bencher| { let s = include_str!("./small.wkt");