From 7000c0f8c915eb1907b829376cf8fc69e819348a Mon Sep 17 00:00:00 2001 From: Neeraj Kashyap Date: Mon, 20 Sep 2021 13:42:59 -0700 Subject: [PATCH] Updated tests workflow and changed client version to 0.0.1 --- .github/workflows/test.clients.python.yml | 11 ++++++++++- clients/python/moonstream/client.py | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.clients.python.yml b/.github/workflows/test.clients.python.yml index 8f1d92f0..3da59eb3 100644 --- a/.github/workflows/test.clients.python.yml +++ b/.github/workflows/test.clients.python.yml @@ -1,4 +1,4 @@ -name: Lint Moonstream Python client library +name: Linting and tests for the Moonstream Python client library on: pull_request: @@ -25,3 +25,12 @@ jobs: - name: Black syntax check working-directory: ./clients/python run: black --check moonstream/ + - name: Unit tests + working-directory: ./clients/python + run: python -m unittest discover -v + - name: Check that versions are synchronized + working-directory: ./clients/python + run: | + CLIENT_VERSION=$(python -c "from moonstream.client import CLIENT_VERSION; print(CLIENT_VERSION)") + SETUP_PY_VERSION=$(python setup.py --version) + test "$CLIENT_VERSION" = "$SETUP_PY_VERSION" diff --git a/clients/python/moonstream/client.py b/clients/python/moonstream/client.py index 285cf6a0..4a176172 100644 --- a/clients/python/moonstream/client.py +++ b/clients/python/moonstream/client.py @@ -13,7 +13,7 @@ logger.setLevel(log_level) # Keep this synchronized with the version in setup.py -CLIENT_VERSION = "0.1.0" +CLIENT_VERSION = "0.0.1" def moonstream_endpoints(url: str) -> Dict[str, str]: