From 3a12236694c5f54b2f5f1d80364cff8078fcaaa8 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Nov 2022 09:38:45 +0200 Subject: [PATCH 1/5] dependency bumps, python 3.11, github matrix --- .github/workflows/ci.yml | 37 ++++++++++++++----------------------- pyproject.toml | 11 +++++------ 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c908029..9501d3cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,11 +15,11 @@ jobs: timeout-minutes: 40 strategy: matrix: - platform: ['ubuntu-20.04'] - python: ['3.6', '3.7', '3.8', '3.9'] + platform: ['ubuntu-20.04', 'macos-12'] + python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Number of commits to fetch. 0 indicates all history for all branches and tags. with: fetch-depth: '' @@ -29,19 +29,10 @@ jobs: sudo apt-get install -y libssl-dev - name: Setup Python - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python }} - architecture: x64 - - - name: Cache pip - uses: actions/cache@v1 - with: - path: ~/.cache/pip # This path is specific to Ubuntu - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ matrix.platform }}-${{ matrix.python }}-pyproject.toml-${{ hashFiles('pyproject.toml') }} - restore-keys: | - ${{ matrix.platform }}-${{ matrix.python }}-pyproject.toml-${{hashFiles('pyproject.toml')}}} + python-version: '${{ matrix.python }}' + cache: 'pip' - name: Install Python dependencies run: | @@ -51,14 +42,14 @@ jobs: poetry export --dev --without-hashes -o requirements-${{matrix.platform}}-${{matrix.python}}.txt pip install -r requirements-${{matrix.platform}}-${{matrix.python}}.txt - # - name: Cache Redis - # id: cache-redis - # uses: actions/cache@v1 - # with: - # path: redis - # key: ${{ matrix.platform }}-${{ matrix.python }}-redis - # restore-keys: | - # ${{ matrix.platform }}-${{ matrix.python }}-redis + - name: Cache Redis + id: cache-redis + uses: actions/cache@v3 + with: + path: redis + key: ${{ matrix.platform }}-${{ matrix.python }}-redis + restore-keys: | + ${{ matrix.platform }}-${{ matrix.python }}-redis - name: Install Redis Server test dependencies # if: steps.cache-redis.outputs.cache-hit != 'true' diff --git a/pyproject.toml b/pyproject.toml index 6a8dfa7d..8509e43e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "RLTest" -version = "0.5.9" +version = "0.6.0" description="Redis Labs Test Framework, allow to run tests on redis and modules on a variety of environments" authors = ["RedisLabs "] license = "BSD-3-Clause" @@ -19,6 +19,7 @@ classifiers = [ 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'License :: OSI Approved :: BSD License', 'Development Status :: 5 - Production/Stable' ] @@ -26,9 +27,8 @@ classifiers = [ [tool.poetry.dependencies] python = ">= 3.6.0" distro = "^1.5.0" -redis = "^4.2.2" -psutil = "5.8.0" # 5.9.0 currently broken on macOS -pytest-cov = "2.5" +redis = ">=4.3.4" +psutil = ">=5.9.4" [tool.poetry.urls] repository = "https://github.com/RedisLabsModules/RLTest" @@ -39,10 +39,9 @@ RLTest = 'RLTest.__main__:main' [tool.poetry.dev-dependencies] codecov = "*" flake8 = "*" -rmtest = "^0.7.0" -nose = "^1.3.7" ml2rt = "^0.2.0" pytest = "^6.0" +pytest-cov = "^2.5" [build-system] requires = ["poetry-core>=1.0.0"] From da56b0994f34337921f34bc80cdbf017e63c672d Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Nov 2022 10:02:03 +0200 Subject: [PATCH 2/5] ci and argpec --- .github/workflows/ci.yml | 15 ++++++++++++++- RLTest/__main__.py | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9501d3cb..3fcf8d5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,6 @@ jobs: uses: actions/setup-python@v4 with: python-version: '${{ matrix.python }}' - cache: 'pip' - name: Install Python dependencies run: | @@ -42,6 +41,20 @@ jobs: poetry export --dev --without-hashes -o requirements-${{matrix.platform}}-${{matrix.python}}.txt pip install -r requirements-${{matrix.platform}}-${{matrix.python}}.txt + - name: Cache pyton + id: cache-pythonbits + uses: actions/cache@v3 + with: + path: | + ~/.cache/pip + ~/.cache/poetry + ~/Library/Caches/pip + ~/Library/Caches/poetry + key: ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')-python + restore-keys: | + ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')-python + + - name: Cache Redis id: cache-redis uses: actions/cache@v3 diff --git a/RLTest/__main__.py b/RLTest/__main__.py index ab307a98..825a4f05 100644 --- a/RLTest/__main__.py +++ b/RLTest/__main__.py @@ -573,7 +573,7 @@ def _runTest(self, test, numberOfAssertionFailed=0, prefix='', before=None, afte if not test.is_method: Defaults.curr_test_name = testFullName - if len(inspect.getargspec(test.target).args) > 0 and not test.is_method: + if len(inspect.getfullargspec(test.target).args) > 0 and not test.is_method: try: env = Env(testName=test.name) except Exception as e: From d741abde0860c4809ca172174f3664cba13c1b40 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Nov 2022 10:08:41 +0200 Subject: [PATCH 3/5] sytnax --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fcf8d5b..f0159687 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,9 +50,9 @@ jobs: ~/.cache/poetry ~/Library/Caches/pip ~/Library/Caches/poetry - key: ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')-python + key: ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')}-python restore-keys: | - ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')-python + ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')}}-python - name: Cache Redis From 8d778be8004c0143e167c3a91e0e66b8f5bc613b Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Nov 2022 12:18:16 +0200 Subject: [PATCH 4/5] syntax --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0159687..0fecf6f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: ~/.cache/poetry ~/Library/Caches/pip ~/Library/Caches/poetry - key: ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')}-python + key: ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')}}-python restore-keys: | ${{ matrix.platform }}-${{ matrix.python }}-${{hashFiles('**/requirements.txt')}}-python From 130b9224d8ad85a22e481438161d05d16970f132 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Tue, 15 Nov 2022 15:19:21 +0200 Subject: [PATCH 5/5] removed mac --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0fecf6f4..1db177f6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 40 strategy: matrix: - platform: ['ubuntu-20.04', 'macos-12'] + platform: ['ubuntu-20.04'] python: ['3.6', '3.7', '3.8', '3.9', '3.10', '3.11'] steps: