Closed JamesParrott closed 7 months ago
The suggestion from tzortzispanagiotis works great with a matrix strategy, for PyShp.
Using this, the CI can be fixed, simply by replacing all the lines in the above file between:
jobs:
build:
and
- name: Install dependencies
run: |
python -m pip install --upgrade pip
(exclusive) with:
strategy:
fail-fast: false
matrix:
python-version: ["2.7.18", "3.6.15", "3.7.17", "3.8.18", "3.9.18", "3.10.13", "3.11.7", "3.12.1", "3.13.0a2"]
runs-on: ubuntu-20.04
container:
image: python:${{ matrix.python-version }}-slim
steps:
- uses: actions/checkout@v3
I have tested this on my fork, but could only get a green tick for Python 2.7 as well, by disabling __geo_interface__
, and all the tests for it, and for Pythons 3.10 upwards by relaxing the pinned version of Pytest, allowing Pip to pick the latest (and possibly by making other changes that don't spring to mine right now):
https://github.com/JamesParrott/IronPyShp/actions/runs/7534760731
PyShp Version
All
Python Version
CI
Your code
The issue already occurs, due to PyShps's own CI code/config/setup. In particular the Github action file below: https://github.com/GeospatialPython/pyshp/blob/master/.github/workflows/build.yml
Full stacktrace
https://github.com/GeospatialPython/pyshp/actions
Other notes
In June 2023, Python 2 was dropped by /actions/setup-python https://github.com/actions/setup-python/issues/672
A work around to run the action in a container, is suggested in the comments by tzortzispanagiotis (the proviso about localhost is not relevant to PyShp as it does not do any networking): https://github.com/actions/setup-python/issues/672#issuecomment-1589120020
I'll investigate using that with the actions matrix. Python 2 is no longer pre-installed in current Actions Runner Ubuntu images (19.04 having been dropped?).
https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md