Skip to content

feat: Implement native Rust ST_Centroid and ST_Length functions #137

feat: Implement native Rust ST_Centroid and ST_Length functions

feat: Implement native Rust ST_Centroid and ST_Length functions #137

Workflow file for this run

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: python
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}-rust
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash -l -eo pipefail {0}
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
name: "python ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
env:
CARGO_INCREMENTAL: 0
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v4
with:
python-version: '3.x'
cache: 'pip'
- name: Use stable Rust
id: rust
run: |
rustup toolchain install stable --no-self-update
rustup default stable
- name: Install dependencies
shell: bash
run: sudo apt-get update && sudo apt-get install -y libgeos-dev
- uses: Swatinem/rust-cache@v2
with:
# Update this key to force a new cache
prefix-key: "python-v1"
- name: Install
run: |
pip install -e "python/sedonadb/[test]" -vv
- name: Download minimal geoarrow-data assets
run: |
python submodules/download-assets.py "*water-junc*" "*water-point*"
- name: Start PostGIS
run: |
docker compose up --wait --detach postgis
- name: Run tests
env:
# Ensure that we don't skip tests that we didn't intend to
SEDONADB_PYTHON_NO_SKIP_TESTS: "true"
run: |
cd python
python -m pytest -vv
- name: Run doctests
run: |
cd python
python -m pytest --doctest-modules
- name: Shutdown docker compose services
if: always()
run: |
docker compose down