From 02fa9d41c130caa4c65c9eb8937fcf9792293d9f Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 20 Feb 2025 09:22:49 +0100 Subject: [PATCH 1/7] fix test to be ready for Windows --- tests/test_select_gen.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_select_gen.py b/tests/test_select_gen.py index 6d578f7708..8bc949146c 100644 --- a/tests/test_select_gen.py +++ b/tests/test_select_gen.py @@ -1,3 +1,4 @@ +import os import subprocess import sys from pathlib import Path @@ -10,8 +11,8 @@ @needs_py39 def test_select_gen() -> None: result = subprocess.run( - [sys.executable, "scripts/generate_select.py"], - env={"CHECK_JINJA": "1"}, + [sys.executable, Path("scripts") / "generate_select.py"], + env={**os.environ, "CHECK_JINJA": "1"}, check=True, cwd=root_path, capture_output=True, From af2e6e6ccee6a22221bda7c89596b77768a28736 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 20 Feb 2025 09:25:06 +0100 Subject: [PATCH 2/7] remove Python 3.7 for now --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b5628651a6..9126db93c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,6 @@ jobs: strategy: matrix: python-version: - - "3.7" - "3.8" - "3.9" - "3.10" From d39d378f677501ef666abc1f3e1e02f130dcdab7 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 20 Feb 2025 09:31:55 +0100 Subject: [PATCH 3/7] allow different os in the matrix --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9126db93c5..302db9bc15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,6 @@ env: jobs: test: - runs-on: ubuntu-latest strategy: matrix: python-version: @@ -32,10 +31,12 @@ jobs: - "3.10" - "3.11" - "3.12" + os: ubuntu-latest pydantic-version: - pydantic-v1 - pydantic-v2 fail-fast: false + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Set up Python From ab07cbf54657b681e10dae077d77d533a1a283f2 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 20 Feb 2025 10:32:51 +0100 Subject: [PATCH 4/7] take os out of the matrix again --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 302db9bc15..9126db93c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,7 @@ env: jobs: test: + runs-on: ubuntu-latest strategy: matrix: python-version: @@ -31,12 +32,10 @@ jobs: - "3.10" - "3.11" - "3.12" - os: ubuntu-latest pydantic-version: - pydantic-v1 - pydantic-v2 fail-fast: false - runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Set up Python From 158a7bf7fb8c05e091433bc4abf760948c20f75e Mon Sep 17 00:00:00 2001 From: svlandeg Date: Thu, 20 Feb 2025 10:38:57 +0100 Subject: [PATCH 5/7] one more try to move os to the matrix --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9126db93c5..302db9bc15 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,6 @@ env: jobs: test: - runs-on: ubuntu-latest strategy: matrix: python-version: @@ -32,10 +31,12 @@ jobs: - "3.10" - "3.11" - "3.12" + os: ubuntu-latest pydantic-version: - pydantic-v1 - pydantic-v2 fail-fast: false + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - name: Set up Python From 539b364a526828c41820f4ac9b28f4d959099c51 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 21 Feb 2025 14:18:24 +0100 Subject: [PATCH 6/7] extend grid --- .github/workflows/test.yml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fe527ee0f6..34195b2151 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,16 +25,24 @@ jobs: test: strategy: matrix: - python-version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" - os: ubuntu-latest + os: [ ubuntu-latest, windows-latest, macos-latest ] + python-version: [ "3.12" ] pydantic-version: - pydantic-v1 - pydantic-v2 + include: + - os: macos-latest + python-version: "3.8" + pydantic-version: pydantic-v1 + - os: windows-latest + python-version: "3.9" + pydantic-version: pydantic-v2 + - os: ubuntu-latest + python-version: "3.10" + pydantic-version: pydantic-v1 + - os: macos-latest + python-version: "3.11" + pydantic-version: pydantic-v2 fail-fast: false runs-on: ${{ matrix.os }} steps: From 0a6a4095e22ffa5b9e51df68aee80a7a7e8fbf35 Mon Sep 17 00:00:00 2001 From: svlandeg Date: Fri, 21 Feb 2025 14:21:40 +0100 Subject: [PATCH 7/7] adjust name of coverage file --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 34195b2151..93087cd06f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,7 +88,7 @@ jobs: - name: Store coverage files uses: actions/upload-artifact@v4 with: - name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} + name: coverage-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.pydantic-version }} path: coverage include-hidden-files: true - uses: codecov/codecov-action@v5