diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e2c155e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +--- +version: 2 +updates: + - package-ecosystem: pip # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: weekly diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml new file mode 100644 index 0000000..ded0789 --- /dev/null +++ b/.github/workflows/python-package.yml @@ -0,0 +1,34 @@ +--- +name: Python package +'on': + push: + branches: ["master"] + pull_request: + branches: ["master"] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version-file: pyproject.toml + cache: pip + cache-dependency-path: | + poetry.lock + + - name: Install poetry + run: | + python -m pip install poetry + + - name: Install package + run: | + poetry install + + - name: Test with pytest + run: | + python -m poetry run pytest diff --git a/tests/test_client.py b/tests/test_client.py index d5dce57..78e1d17 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -15,9 +15,10 @@ def setup_class(cls): cassandra_dir = '.cassandra' if os.path.exists(PROJECT_ROOT + '/' + cassandra_dir): shutil.rmtree(PROJECT_ROOT + '/' + cassandra_dir, ignore_errors=True) - cls.ccm_cluster = ccmlib.cluster.Cluster(f'{PROJECT_ROOT}', '.cassandra', cassandra_version='2.2.6') - node = cls.ccm_cluster.populate(1).start()[0][0].network_interfaces['binary'] - cls.cluster = Cluster(contact_points=[node[0]], port=node[1]) + cls.ccm_cluster = ccmlib.cluster.Cluster(f'{PROJECT_ROOT}', '.cassandra', cassandra_version='4.0.7') + nodes = cls.ccm_cluster.populate(1).start(no_wait=True, verbose=True,) + rpc_address, native_transport_port = nodes[0][0].network_interfaces['binary'] + cls.cluster = Cluster(contact_points=[rpc_address], port=native_transport_port) @classmethod def teardown_class(cls):