Merge pull request #333 from JamesParrott/pyshp-3.0.0-alpha-even-more… #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will run the pre-commit hooks (including linters), and the tests with a variety of Python versions | |
name: Run pre-commit hooks and tests | |
on: | |
push: | |
pull_request: | |
workflow_call: | |
workflow_dispatch: | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- uses: pre-commit/[email protected] | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- name: install Pylint and plugin | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pylint pylint-per-file-ignores | |
pip install -e . | |
- name: run Pylint for errors and warnings only | |
run: | | |
pylint --disable=C test_shapefile.py src/shapefile.py | |
build_wheel_and_sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
- name: Build wheel from the project repo | |
uses: ./.github/actions/build_wheel_and_sdist | |
test_on_supported_Pythons: | |
needs: build_wheel_and_sdist | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [ | |
"3.9", | |
"3.10", | |
"3.11", | |
"3.12", | |
"3.13", | |
"3.14.0-beta.4", | |
] | |
os: [ | |
"macos-latest", | |
"ubuntu-24.04", | |
"windows-latest", | |
] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/checkout@v4 | |
with: | |
path: ./Pyshp | |
- name: Non-network tests | |
uses: ./Pyshp/.github/actions/test | |
with: | |
pyshp_repo_directory: ./Pyshp | |
- name: Network tests | |
uses: ./Pyshp/.github/actions/test | |
with: | |
extra_args: '-m network' | |
replace_remote_urls_with_localhost: 'yes' | |
# Checkout to ./PyShp, as the test job also needs to check out the artefact repo | |
pyshp_repo_directory: ./Pyshp |