From be58b8fc09fe168c611d2ecd1ec557906846375d Mon Sep 17 00:00:00 2001 From: florian-vuillemot Date: Thu, 30 Jan 2025 23:06:53 +0000 Subject: [PATCH] add tests --- .github/workflows/compatibility.yml | 18 +++++++++++++----- compatibility/write.py | 7 +++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index 0e43e07..18bd2eb 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -52,10 +52,9 @@ jobs: write: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [windows-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] cshelve-version: ["0.9.0"] - max-parallel: 1 runs-on: ${{ matrix.os }} timeout-minutes: 10 @@ -81,7 +80,7 @@ jobs: - name: Write working-directory: compatibility run: | - python3 write.py ${{ matrix.cshelve-version }} + python3 write.py "${{ matrix.cshelve-version }}" "${{ matrix.python-version }}" versions: needs: write @@ -117,7 +116,11 @@ jobs: - name: Read working-directory: compatibility run: | - python3 read.py ${{ matrix.cshelve-version }} + python3 read.py "${{ matrix.cshelve-version }}" "3.9" + python3 read.py "${{ matrix.cshelve-version }}" "3.10" + python3 read.py "${{ matrix.cshelve-version }}" "3.11" + python3 read.py "${{ matrix.cshelve-version }}" "3.12" + python3 read.py "${{ matrix.cshelve-version }}" "3.13" latest: needs: build @@ -126,6 +129,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + cshelve-version: ["0.9.0"] max-parallel: 1 runs-on: ${{ matrix.os }} @@ -162,4 +166,8 @@ jobs: - name: Read working-directory: compatibility run: | - python3 read.py ${{ matrix.cshelve-version }} + python3 read.py "${{ matrix.cshelve-version }}" "3.9" + python3 read.py "${{ matrix.cshelve-version }}" "3.10" + python3 read.py "${{ matrix.cshelve-version }}" "3.11" + python3 read.py "${{ matrix.cshelve-version }}" "3.12" + python3 read.py "${{ matrix.cshelve-version }}" "3.13" diff --git a/compatibility/write.py b/compatibility/write.py index 6c29a9c..2654d14 100644 --- a/compatibility/write.py +++ b/compatibility/write.py @@ -3,7 +3,10 @@ import cshelve -version = sys.argv[1] +cshelve_version = sys.argv[1] +python_version = sys.argv[2] with cshelve.open("./azure-passwordless.ini") as db: - db[f"compatibility-{version}"] = f"my complex data from version {version}" + db[ + f"compatibility-{cshelve_version}-{python_version}" + ] = f"my complex data from cshelve version {cshelve_version} and python {python_version}"