From 64fa27b6d6a662fddb32bc6bef1e92cdd7c29386 Mon Sep 17 00:00:00 2001 From: Loic Huder Date: Thu, 29 Aug 2024 14:27:17 +0200 Subject: [PATCH 1/2] Add CI test for Python 3.12 --- .github/workflows/lint-test.yml | 7 ++++++- test/base_test.py | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index b2162b6..f248d01 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -11,6 +11,11 @@ on: jobs: lint_test: runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ['3.8', '3.12'] + steps: - name: Checkout 🏷️ uses: actions/checkout@v2 @@ -18,7 +23,7 @@ jobs: - name: Install Python 🐍 uses: actions/setup-python@v2 with: - python-version: '3.8' + python-version: ${{ matrix.python-version }} architecture: 'x64' - name: Install dependencies ⚙️ diff --git a/test/base_test.py b/test/base_test.py index 24f2225..582aefa 100644 --- a/test/base_test.py +++ b/test/base_test.py @@ -388,7 +388,7 @@ def test_meta_on_valid_ext_link(self, server, resolve_links): h5file["ext_link"] = h5py.ExternalLink(source_file, "data") response = server.get( - f"/meta/?{urlencode({'file': filename, 'path': '/ext_link', 'resolve_links': f'{resolve_links}'})}" + f"/meta/?{urlencode({'file': filename, 'path': '/ext_link', 'resolve_links': resolve_links.value})}" ) content = decode_response(response) @@ -539,7 +539,7 @@ def test_meta_on_broken_soft_link(self, server, resolve_links): with h5py.File(server.served_directory / filename, mode="w") as h5file: h5file[link_path] = h5py.SoftLink("not_an_entity") - url = f"/meta/?{urlencode({'file': filename, 'path': link_path, 'resolve_links': f'{resolve_links}'})}" + url = f"/meta/?{urlencode({'file': filename, 'path': link_path, 'resolve_links': resolve_links.value})}" # It should return 404 if trying to resolve the broken link if resolve_links == LinkResolution.ALL: From 1464c9c6488bc456dc50a43af71122efc525ef73 Mon Sep 17 00:00:00 2001 From: Loic Huder Date: Thu, 29 Aug 2024 14:48:32 +0200 Subject: [PATCH 2/2] Update action versions in CI --- .github/workflows/lint-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index f248d01..658b8b8 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -18,10 +18,10 @@ jobs: steps: - name: Checkout 🏷️ - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Python 🐍 - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} architecture: 'x64'