From 4dd320c99f8de1d5dc91c2f31a5fe06662bd0e1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 20 Feb 2025 20:29:33 +0100 Subject: [PATCH 01/14] =?UTF-8?q?=E2=9C=85=20Update=20tests=20script,=20en?= =?UTF-8?q?able=20xml=20report?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test.sh b/scripts/test.sh index ff4b114b18..08c86306cd 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -7,3 +7,4 @@ coverage run -m pytest tests coverage combine coverage report coverage html +coverage xml \ No newline at end of file From 5259360152c8deaee29a09558730444b9d317690 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Thu, 20 Feb 2025 20:29:57 +0100 Subject: [PATCH 02/14] =?UTF-8?q?=F0=9F=91=B7=20Add=20Codecov=20to=20CI,?= =?UTF-8?q?=20Smokeshow/Cloudflare=20has=20been=20flaky=20lately?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 89 ++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 41 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9126db93c5..14621f791e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,54 +74,61 @@ jobs: env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - - name: Store coverage files - uses: actions/upload-artifact@v4 + # - name: Store coverage files + # uses: actions/upload-artifact@v4 + # with: + # name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} + # path: coverage + # include-hidden-files: true + - uses: codecov/codecov-action@v5 with: - name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} - path: coverage - include-hidden-files: true + fail_ci_if_error: true + files: ./coverage.xml + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true - coverage-combine: - needs: - - test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - name: Setup uv - uses: astral-sh/setup-uv@v5 - with: - version: "0.4.15" - enable-cache: true - cache-dependency-glob: | - requirements**.txt - pyproject.toml - - name: Get coverage files - uses: actions/download-artifact@v4 - with: - pattern: coverage-* - path: coverage - merge-multiple: true - - name: Install Dependencies - run: uv pip install -r requirements-tests.txt - - run: ls -la coverage - - run: coverage combine coverage - - run: coverage report - - run: coverage html --title "Coverage for ${{ github.sha }}" - - name: Store coverage HTML - uses: actions/upload-artifact@v4 - with: - name: coverage-html - path: htmlcov - include-hidden-files: true + # coverage-combine: + # needs: + # - test + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.12' + # - name: Setup uv + # uses: astral-sh/setup-uv@v5 + # with: + # version: "0.4.15" + # enable-cache: true + # cache-dependency-glob: | + # requirements**.txt + # pyproject.toml + # - name: Get coverage files + # uses: actions/download-artifact@v4 + # with: + # pattern: coverage-* + # path: coverage + # merge-multiple: true + # - name: Install Dependencies + # run: uv pip install -r requirements-tests.txt + # - run: ls -la coverage + # - run: coverage combine coverage + # - run: coverage report + # - run: coverage html --title "Coverage for ${{ github.sha }}" + # - name: Store coverage HTML + # uses: actions/upload-artifact@v4 + # with: + # name: coverage-html + # path: htmlcov + # include-hidden-files: true # https://github.com/marketplace/actions/alls-green#why alls-green: # This job does nothing and is only used for the branch protection if: always() needs: - - coverage-combine + - test runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From 714f679276c0736da00de31f4eff8d0a138f6ece Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 19:32:29 +0000 Subject: [PATCH 03/14] =?UTF-8?q?=F0=9F=8E=A8=20[pre-commit.ci]=20Auto=20f?= =?UTF-8?q?ormat=20from=20pre-commit.com=20hooks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 08c86306cd..826ae903d5 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -7,4 +7,4 @@ coverage run -m pytest tests coverage combine coverage report coverage html -coverage xml \ No newline at end of file +coverage xml From 41414a9f769d71190d7e308903ff7cd309471d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 09:51:39 +0100 Subject: [PATCH 04/14] =?UTF-8?q?=F0=9F=8E=A8=20Add=20new=20line?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test.sh b/scripts/test.sh index 08c86306cd..826ae903d5 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -7,4 +7,4 @@ coverage run -m pytest tests coverage combine coverage report coverage html -coverage xml \ No newline at end of file +coverage xml From 4e9b4397affab11995bc3ef2301dd5462f5e41ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 09:59:04 +0100 Subject: [PATCH 05/14] =?UTF-8?q?=F0=9F=91=B7=20Update=20CI,=20enable=20ol?= =?UTF-8?q?d=20coverage=20at=20the=20same=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 84 +++++++++++++++++++------------------- 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 14621f791e..1ed694327c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,12 +74,6 @@ jobs: env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - # - name: Store coverage files - # uses: actions/upload-artifact@v4 - # with: - # name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} - # path: coverage - # include-hidden-files: true - uses: codecov/codecov-action@v5 with: fail_ci_if_error: true @@ -87,42 +81,50 @@ jobs: name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} verbose: true + # TODO: if removing Smokeshow, and moving only to Codecov, remove this + - name: Store coverage files + uses: actions/upload-artifact@v4 + with: + name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} + path: coverage + include-hidden-files: true - # coverage-combine: - # needs: - # - test - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.12' - # - name: Setup uv - # uses: astral-sh/setup-uv@v5 - # with: - # version: "0.4.15" - # enable-cache: true - # cache-dependency-glob: | - # requirements**.txt - # pyproject.toml - # - name: Get coverage files - # uses: actions/download-artifact@v4 - # with: - # pattern: coverage-* - # path: coverage - # merge-multiple: true - # - name: Install Dependencies - # run: uv pip install -r requirements-tests.txt - # - run: ls -la coverage - # - run: coverage combine coverage - # - run: coverage report - # - run: coverage html --title "Coverage for ${{ github.sha }}" - # - name: Store coverage HTML - # uses: actions/upload-artifact@v4 - # with: - # name: coverage-html - # path: htmlcov - # include-hidden-files: true + # TODO: if removing Smokeshow, and moving only to Codecov, remove this + coverage-combine: + needs: + - test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Setup uv + uses: astral-sh/setup-uv@v5 + with: + version: "0.4.15" + enable-cache: true + cache-dependency-glob: | + requirements**.txt + pyproject.toml + - name: Get coverage files + uses: actions/download-artifact@v4 + with: + pattern: coverage-* + path: coverage + merge-multiple: true + - name: Install Dependencies + run: uv pip install -r requirements-tests.txt + - run: ls -la coverage + - run: coverage combine coverage + - run: coverage report + - run: coverage html --title "Coverage for ${{ github.sha }}" + - name: Store coverage HTML + uses: actions/upload-artifact@v4 + with: + name: coverage-html + path: htmlcov + include-hidden-files: true # https://github.com/marketplace/actions/alls-green#why alls-green: # This job does nothing and is only used for the branch protection From 2c809c20cd5dbe93cb52078c0ed0a34ba863af7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:05:58 +0100 Subject: [PATCH 06/14] =?UTF-8?q?=F0=9F=A7=AA=20Debug=20with=20tmate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ed694327c..a751ceba9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,6 +69,14 @@ jobs: if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2' run: bash scripts/lint.sh - run: mkdir coverage + # TODO: remove this + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + with: + limit-access-to-actor: true + env: + COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} + CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - name: Test run: bash scripts/test.sh env: From fdbf07ecd23cd875d957d9d175f692b5f36b6a62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:11:57 +0100 Subject: [PATCH 07/14] =?UTF-8?q?=F0=9F=91=B7=20Only=20upload=20files=20in?= =?UTF-8?q?side=20of=20coverage=20directory,=20not=20named=20coverage=20(e?= =?UTF-8?q?.g.=20coverage.xml)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .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 a751ceba9c..b0fab43044 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -94,7 +94,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} - path: coverage + path: coverage/* include-hidden-files: true # TODO: if removing Smokeshow, and moving only to Codecov, remove this From 544687aff381dfa7b1fa88c16c21b01078da6499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:19:27 +0100 Subject: [PATCH 08/14] =?UTF-8?q?=F0=9F=91=B7=20Debug=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b0fab43044..bbd37fb6f0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,6 +89,7 @@ jobs: name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} verbose: true + - run: ls -la coverage # TODO: if removing Smokeshow, and moving only to Codecov, remove this - name: Store coverage files uses: actions/upload-artifact@v4 From bee02e4b816997afd392f41ad6026640f5d5e9bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:25:47 +0100 Subject: [PATCH 09/14] =?UTF-8?q?=F0=9F=91=B7=20Debug=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bbd37fb6f0..21cf7ad038 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -82,13 +82,6 @@ jobs: env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - - uses: codecov/codecov-action@v5 - with: - fail_ci_if_error: true - files: ./coverage.xml - name: codecov-umbrella - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - run: ls -la coverage # TODO: if removing Smokeshow, and moving only to Codecov, remove this - name: Store coverage files @@ -97,6 +90,13 @@ jobs: name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} path: coverage/* include-hidden-files: true + - uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + files: ./coverage.xml + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true # TODO: if removing Smokeshow, and moving only to Codecov, remove this coverage-combine: From 2f2d7e2daa1eaa0b30e14ce9da4cc6814aaafb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:45:44 +0100 Subject: [PATCH 10/14] =?UTF-8?q?=F0=9F=94=A5=20Remove=20debugging=20tmate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21cf7ad038..c164c1e104 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -70,13 +70,13 @@ jobs: run: bash scripts/lint.sh - run: mkdir coverage # TODO: remove this - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - with: - limit-access-to-actor: true - env: - COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} - CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 + # with: + # limit-access-to-actor: true + # env: + # COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} + # CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - name: Test run: bash scripts/test.sh env: From 4b873718ef6f2fe3a12adcdf7ca49d9596eb4b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:49:30 +0100 Subject: [PATCH 11/14] =?UTF-8?q?=F0=9F=94=A7=20Reset=20alls-green=20confi?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .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 c164c1e104..7ffd73564c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -139,7 +139,7 @@ jobs: alls-green: # This job does nothing and is only used for the branch protection if: always() needs: - - test + - coverage-combine runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From e85f9f5f58afd86f2b407bbec6a3696a52e9caeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:50:54 +0100 Subject: [PATCH 12/14] =?UTF-8?q?=F0=9F=91=B7=20Update=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ffd73564c..b251b9b771 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,14 +69,6 @@ jobs: if: matrix.python-version != '3.7' && matrix.pydantic-version == 'pydantic-v2' run: bash scripts/lint.sh - run: mkdir coverage - # TODO: remove this - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - # with: - # limit-access-to-actor: true - # env: - # COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} - # CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - name: Test run: bash scripts/test.sh env: @@ -84,6 +76,7 @@ jobs: CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - run: ls -la coverage # TODO: if removing Smokeshow, and moving only to Codecov, remove this + # Upload files before running Codecov, as it generates an extra file coverage/coverage.xml, and that breaks coverage-combine - name: Store coverage files uses: actions/upload-artifact@v4 with: From 9990055f782f31598a76e00f1c4bc05699d03af1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:51:33 +0100 Subject: [PATCH 13/14] =?UTF-8?q?=F0=9F=94=A7=20Reset=20upload-artifact=20?= =?UTF-8?q?config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .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 b251b9b771..68b93cbeb5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -81,7 +81,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-${{ matrix.python-version }}-${{ matrix.pydantic-version }} - path: coverage/* + path: coverage include-hidden-files: true - uses: codecov/codecov-action@v5 with: From 0321b49486a809e99a5839edcf7296d57eca6226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Ram=C3=ADrez?= Date: Fri, 21 Feb 2025 12:52:18 +0100 Subject: [PATCH 14/14] =?UTF-8?q?=F0=9F=91=B7=20Update=20CI=20config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 68b93cbeb5..c924e54ef4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,7 +74,6 @@ jobs: env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.pydantic-version }} CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }} - - run: ls -la coverage # TODO: if removing Smokeshow, and moving only to Codecov, remove this # Upload files before running Codecov, as it generates an extra file coverage/coverage.xml, and that breaks coverage-combine - name: Store coverage files