Skip to content

Commit 8712826

Browse files
authored
Add test matrix for different Python versions (#1526)
* Add test matrix for different Python versions Signed-off-by: Willem Pienaar <git@willem.co> * Remove windows dependencies Signed-off-by: Willem Pienaar <git@willem.co> * Bump Pyarrow version Signed-off-by: Willem Pienaar <git@willem.co> * Add test matrix to integration tests Signed-off-by: Willem Pienaar <git@willem.co> * Relax grpcio-tools version Signed-off-by: Willem Pienaar <git@willem.co> * Relax grpcio versions to 1.34 Signed-off-by: Willem Pienaar <git@willem.co> * Remove numpy version pin and pandas pin Signed-off-by: Willem Pienaar <git@willem.co>
1 parent 3d3f806 commit 8712826

File tree

4 files changed

+39
-14
lines changed

4 files changed

+39
-14
lines changed

.github/workflows/integration_tests.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,19 @@ on:
77

88
jobs:
99
integration-test-python:
10-
runs-on: ubuntu-latest
11-
container: python:3.7
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version: [ 3.7, 3.8, 3.9 ]
15+
os: [ ubuntu-latest, macOS-latest ]
1216
steps:
1317
- uses: actions/checkout@v2
18+
- name: Setup Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
architecture: x64
1423
- name: Set up Cloud SDK
1524
uses: google-github-actions/setup-gcloud@master
1625
with:

.github/workflows/pr_integration_tests.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,12 @@ jobs:
1212
# all jobs MUST have this if check for 'ok-to-test' or 'approved' for security purposes.
1313
if: (github.event.action == 'labeled' && (github.event.label.name == 'approved' || github.event.label.name == 'ok-to-test'))
1414
|| (github.event.action != 'labeled' && (contains(github.event.pull_request.labels.*.name, 'ok-to-test') || contains(github.event.pull_request.labels.*.name, 'approved')))
15-
runs-on: ubuntu-latest
16-
container: python:3.7
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
python-version: [ 3.7, 3.8, 3.9 ]
20+
os: [ ubuntu-latest, macOS-latest ]
1721
services:
1822
redis:
1923
image: redis
@@ -30,6 +34,11 @@ jobs:
3034
# code from the PR.
3135
ref: refs/pull/${{ github.event.pull_request.number }}/merge
3236
submodules: recursive
37+
- name: Setup Python
38+
uses: actions/setup-python@v2
39+
with:
40+
python-version: ${{ matrix.python-version }}
41+
architecture: x64
3342
- name: Set up Cloud SDK
3443
uses: google-github-actions/setup-gcloud@master
3544
with:

.github/workflows/unit_tests.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: unit-tests
22

33
on: [push, pull_request]
4-
54
jobs:
65
unit-test-python:
7-
runs-on: ubuntu-latest
8-
container: python:3.7
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
python-version: [ 3.7, 3.8, 3.9 ]
11+
os: [ ubuntu-latest, macOS-latest]
912
steps:
1013
- uses: actions/checkout@v2
14+
- name: Setup Python
15+
uses: actions/setup-python@v2
16+
with:
17+
python-version: ${{ matrix.python-version }}
18+
architecture: x64
1119
- name: Install dependencies
1220
run: make install-python-ci-dependencies
1321
- name: Test Python

sdk/python/setup.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,14 @@
4343
"fastavro>=0.22.11,<0.23",
4444
"google-api-core>=1.23.0",
4545
"googleapis-common-protos==1.52.*",
46-
"grpcio>=1.32.0",
46+
"grpcio>=1.34.0",
4747
"Jinja2>=2.0.0",
4848
"jsonschema",
4949
"mmh3",
50-
"numpy<1.20.0",
51-
"pandas~=1.0.0",
50+
"pandas>=1.0.0",
5251
"pandavro==1.5.*",
5352
"protobuf>=3.10",
54-
"pyarrow==2.0.0",
53+
"pyarrow>=2.0.0",
5554
"pydantic>=1.0.0",
5655
"PyYAML==5.3.*",
5756
"tabulate==0.8.*",
@@ -72,8 +71,8 @@
7271
"flake8",
7372
"black==19.10b0",
7473
"isort>=5",
75-
"grpcio-tools>=1.32.0",
76-
"grpcio-testing>=1.32.0",
74+
"grpcio-tools==1.34.0",
75+
"grpcio-testing==1.34.0",
7776
"mock==2.0.0",
7877
"moto",
7978
"mypy==0.790",
@@ -205,7 +204,7 @@ def run(self):
205204
],
206205
entry_points={"console_scripts": ["feast=feast.cli:cli"]},
207206
use_scm_version={"root": "../..", "relative_to": __file__, "tag_regex": TAG_REGEX},
208-
setup_requires=["setuptools_scm", "grpcio", "grpcio-tools>=1.32.0", "mypy-protobuf", "sphinx"],
207+
setup_requires=["setuptools_scm", "grpcio", "grpcio-tools==1.34.0", "mypy-protobuf", "sphinx"],
209208
package_data={
210209
"": [
211210
"protos/feast/**/*.proto",

0 commit comments

Comments
 (0)