diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b369d05..b344195 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,12 @@ jobs: - name: Format run: | bash scripts/format.sh + - name: Install Ray Beam Runner + run: | + pip install -e .[test] + - name: Run Portability tests + run: | + pytest -r A ray_beam_runner/portability/ray_runner_test.py ray_beam_runner/portability/execution_test.py LicenseCheck: name: License Check diff --git a/ray_beam_runner/portability/execution_test.py b/ray_beam_runner/portability/execution_test.py index 3042f37..6c5bd66 100644 --- a/ray_beam_runner/portability/execution_test.py +++ b/ray_beam_runner/portability/execution_test.py @@ -3,12 +3,12 @@ import ray -import apache_beam.portability.api.beam_fn_api_pb2 +from apache_beam.portability.api import beam_fn_api_pb2 from ray_beam_runner.portability.state import RayStateManager class StateHandlerTest(unittest.TestCase): - SAMPLE_STATE_KEY = apache_beam.portability.api.beam_fn_api_pb2.StateKey() + SAMPLE_STATE_KEY = beam_fn_api_pb2.StateKey() SAMPLE_INPUT_DATA = [b"bobby" b"tables", b"drop table", b"where table_name > 12345"] @classmethod diff --git a/requirements_dev.txt b/requirements_dev.txt index 0bcf405..1f9aef5 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -4,3 +4,5 @@ flake8==3.9.1 flake8-comprehensions flake8-quotes==2.0.0 flake8-bugbear==21.9.2 +pytest==7.1.2 +pyhamcrest==2.0.3