diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f38e8cc --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Rust + +on: + push: + branches: + - main + pull_request: + +jobs: + lint-test: + name: Lint and Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2 + + - name: Cargo fmt + run: cargo fmt --all -- --check + + - name: "clippy --all" + run: cargo clippy --all --all-features --tests -- -D warnings + + - name: "cargo check" + run: cargo check --all --all-features + + - name: "cargo test" + run: | + cargo test --all + cargo test --all --all-features diff --git a/Cargo.toml b/Cargo.toml index 2cea941..f17ba0f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,8 +9,7 @@ bytes = "1.7.0" flate2 = "1.0.20" futures = "0.3.31" jpeg = { package = "jpeg-decoder", version = "0.3.0", default-features = false } -ndarray = "*" -num_enum = "*" +num_enum = "0.7.3" object_store = "0.11" thiserror = "1" tiff = "0.9" diff --git a/src/geo/geo_key_directory.rs b/src/geo/geo_key_directory.rs index 3c4dc09..3094310 100644 --- a/src/geo/geo_key_directory.rs +++ b/src/geo/geo_key_directory.rs @@ -1,3 +1,5 @@ +#![allow(dead_code)] + use std::collections::HashMap; use num_enum::{IntoPrimitive, TryFromPrimitive}; diff --git a/src/geo/partial_reads.rs b/src/geo/partial_reads.rs index b60e778..b8b4e58 100644 --- a/src/geo/partial_reads.rs +++ b/src/geo/partial_reads.rs @@ -1,3 +1,4 @@ +#[allow(dead_code)] struct TileMetadata { /// top left corner of the partial read tlx: f64, diff --git a/src/lib.rs b/src/lib.rs index cccde57..f4e9774 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,6 @@ mod decoder; pub mod error; pub mod geo; mod ifd; -mod tag; pub use async_reader::{AsyncFileReader, ObjectReader}; pub use cog::COGReader; diff --git a/src/tag.rs b/src/tag.rs deleted file mode 100644 index e69de29..0000000