Skip to content

Commit

Permalink
Add ci file from geopolars/geoarrow (#3)
Browse files Browse the repository at this point in the history
* Add ci

* Move geos up

* fix clippy
  • Loading branch information
kylebarron authored Jul 1, 2023
1 parent 8c383b3 commit 276f15e
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Rust Tests

on:
push:
branches:
- main
pull_request:

jobs:
fmt:
name: rustfmt
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

# Note not sure why this is needed
- name: Install protobuf
run: |
sudo apt-get install libprotobuf-dev protobuf-compiler
- run: sudo apt install libgeos-dev

- 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 --all-features
1 change: 0 additions & 1 deletion src/enum_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ impl<'a> GeometryArrayTrait<'a> for GeometryArray {
fn rstar_tree(&'a self) -> rstar::RTree<Self::Scalar> {
let mut tree = RTree::new();
(0..self.len())
.into_iter()
.filter_map(|geom_idx| self.get(geom_idx))
.for_each(|geom| tree.insert(geom));
tree
Expand Down

0 comments on commit 276f15e

Please sign in to comment.