From 5b3ea05aa19a3b59eecbc8f651124fcbc1196889 Mon Sep 17 00:00:00 2001 From: Michal Charemza Date: Fri, 20 Sep 2024 16:58:59 +0100 Subject: [PATCH] tests: fix for release candidates (and test on more versions of Python) Fixes https://github.com/uktrade/stream-zip/issues/146 --- .github/workflows/test.yml | 9 ++++++++- test_stream_zip.py | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4de9397..683b44b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,13 +24,20 @@ jobs: os: "ubuntu-20.04" - python-version: "3.10.0" os: "ubuntu-20.04" + - python-version: "3.11.0" + os: "ubuntu-20.04" + - python-version: "3.12.0" + os: "ubuntu-20.04" + - python-version: "3.13.0" + os: "ubuntu-20.04" runs-on: ${{ matrix.os }} steps: - name: "Checkout" uses: "actions/checkout@v3" - - uses: "actions/setup-python@v4" + - uses: "actions/setup-python@v5" with: python-version: '${{ matrix.python-version }}' + allow-prereleases: true - name: "Install bsdcpio" run: | ./install-libarachive.sh diff --git a/test_stream_zip.py b/test_stream_zip.py index 8c06617..0102152 100644 --- a/test_stream_zip.py +++ b/test_stream_zip.py @@ -1388,7 +1388,7 @@ async def test(): @pytest.mark.skipif( - tuple(int(v) for v in platform.python_version().split('.')) < (3,7,0), + tuple(int(v) for v in platform.python_version()[:2].split('.')) < (3,7,0), reason="contextvars are not supported before Python 3.7.0", ) def test_copy_of_context_variable_available_in_iterable():