Skip to content

Rename speed test file to avoid Pytest discovering it on older Pythons #90

Rename speed test file to avoid Pytest discovering it on older Pythons

Rename speed test file to avoid Pytest discovering it on older Pythons #90

# 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:
branches: [ master, ]
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
- name: run Pylint for errors and warnings only, on test_shapefile.py
run: |
pylint --disable=R,C test_shapefile.py
test_on_EOL_Pythons:
strategy:
fail-fast: false
matrix:
python-version: [
"2.7",
"3.5",
"3.6",
"3.7",
"3.8",
]
runs-on: ubuntu-latest
container:
image: python:${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
with:
path: ./Pyshp
- name: Non-network tests
uses: ./Pyshp/.github/actions/test
with:
pyshp_repo_directory: ./Pyshp
python-version: ${{ matrix.python-version }}
- name: Network tests
uses: ./Pyshp/.github/actions/test
with:
extra_args: '-m network'
replace_remote_urls_with_localhost: 'yes'
pyshp_repo_directory: ./Pyshp
python-version: ${{ matrix.python-version }}
test_on_supported_Pythons:
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
python-version: ${{ matrix.python-version }}
- name: Network tests
uses: ./Pyshp/.github/actions/test
with:
extra_args: '-m network'
replace_remote_urls_with_localhost: 'yes'
pyshp_repo_directory: ./Pyshp
python-version: ${{ matrix.python-version }}