-
-
Notifications
You must be signed in to change notification settings - Fork 259
139 lines (118 loc) · 3.58 KB
/
Copy pathrun_checks_build_and_test.yml
File metadata and controls
139 lines (118 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# 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@v6
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: 0.11.15 # uv version
python-version: "3.14"
- name: uv Sync project, asserting locked with dev dependency group
run: uv sync --frozen --group lint
- run: uv run pre-commit run --all-files --show-diff-on-failure --color=always ${{ inputs.extra_args }}
shell: bash
mypy-strict:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install the latest version of uv and set the python version
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: 0.11.15 # uv version
python-version: "3.14"
# use latest mypy version here, (even though pinned to 1.19.1 in lint group for Python 3.9 support)
- name: Run mypy --strict
run: uvx mypy --strict ./src/shapefile.py
build_wheel_and_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Build wheel from the project repo
uses: ./.github/actions/build_wheel_and_sdist
property-based_tests:
needs: build_wheel_and_sdist
strategy:
fail-fast: false
matrix:
python-version: [
"3.14",
"3.13",
"3.12",
"3.15-dev",
"3.11",
"3.10",
"3.9",
]
os: [
"ubuntu-24.04",
]
include:
- python-version: "3.14"
os: "ubuntu-latest"
- python-version: "3.14"
os: "windows-latest"
- python-version: "3.14"
os: "macos-latest"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v6
with:
path: ./Pyshp
- name: "Hypothesis tests"
uses: ./Pyshp/.github/actions/test
with:
extra_args: '-m hypothesis'
run_doctests: 'no'
pyshp_repo_directory: ./Pyshp
Pytest_and_doctests:
needs: build_wheel_and_sdist
strategy:
fail-fast: false
matrix:
python-version: [
"3.14",
"3.13",
"3.12",
"3.15-dev",
"3.11",
"3.10",
"3.9",
]
os: [
"ubuntu-24.04",
"windows-latest",
"macos-latest",
]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v6
with:
path: ./Pyshp
- name: Non-network tests
uses: ./Pyshp/.github/actions/test
with:
pyshp_repo_directory: ./Pyshp
- name: "Network tests (on Localhost ${{ !(matrix.os == 'ubuntu-24.04' && matrix.python-version == '3.14') }})"
uses: ./Pyshp/.github/actions/test
with:
extra_args: '-m network'
replace_remote_urls_with_localhost: ${{ !(matrix.os == 'ubuntu-24.04' && matrix.python-version == '3.14') }}
# Checkout to ./PyShp, as the test job also needs to check out the artefact repo
pyshp_repo_directory: ./Pyshp