Skip to content

touch up names

touch up names #249

Workflow file for this run

name: Test
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 6 * * 1'
jobs:
conda:
name: Test Conda Python ${{ matrix.python-version }}, SIDX-${{ matrix.sidx-version }}, ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
# test oldest and newest versions of python and libspatialindex
python-version: ['3.9', '3.13']
sidx-version: ['1.8.5', '2.1.0']
exclude:
- os: 'macos-latest'
sidx-version: '1.8.5'
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Setup
run: conda install -c conda-forge pip numpy pytest libspatialindex=${{ matrix.sidx-version }} -y
- name: Install
run: pip install -e .
- name: Test with pytest
run: pytest -Werror -v --doctest-modules rtree tests
ubuntu:
name: Test Ubuntu Python ${{ matrix.python-version }}
defaults:
run:
shell: bash -l {0}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup
run: |
sudo apt-get -y install libspatialindex-c6
pip install --upgrade pip
pip install numpy pytest
- name: Build
run: pip install --user .
- name: Test with pytest
run: pytest -Werror -v --doctest-modules rtree tests
- name: Run doctests
run: pytest -Werror -v --doctest-modules docs/source/*.rst
build_wheels:
name: Wheel ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: [ build_sdist]
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- ubuntu-24.04-arm
- macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: '3.13'
- uses: ilammy/msvc-dev-cmd@v1
if: startsWith(matrix.os, 'windows')
- name: Build wheels
uses: pypa/[email protected]
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
build_sdist:
name: Source Distribution
runs-on: ubuntu-latest
needs: [ conda, ubuntu ]
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
attest:
name: "Attest Artifacts"
runs-on: ubuntu-latest
needs: [build_wheels]
environment: pypi
permissions:
id-token: write
attestations: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: actions/attest-build-provenance@v2
with:
subject-path: 'dist/**/*'
publish:
name: "Publish to PyPI"
runs-on: ubuntu-latest
needs: [attest]
if: github.event_name == 'release' && github.event.action == 'published'
permissions:
id-token: write
attestations: write
steps:
- uses: pypa/gh-action-pypi-publish@release/v1