From 818da0859eca9743041a37d1f82e7b59d9d4d622 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 12:59:38 +0000 Subject: [PATCH] ci: Split Web 1 test group so Django runs on its own Co-Authored-By: Ivana Kellyer <131587164+sentrivana@users.noreply.github.com> --- .github/workflows/test-integrations-web-1.yml | 12 --- .github/workflows/test-integrations-web-2.yml | 42 ++------- .github/workflows/test-integrations-web-3.yml | 93 +++++++++++++++++++ .github/workflows/test.yml | 7 ++ .../split_tox_gh_actions.py | 4 +- tox.ini | 8 +- 6 files changed, 116 insertions(+), 50 deletions(-) create mode 100644 .github/workflows/test-integrations-web-3.yml diff --git a/.github/workflows/test-integrations-web-1.yml b/.github/workflows/test-integrations-web-1.yml index 96da815367..c0d54741ac 100644 --- a/.github/workflows/test-integrations-web-1.yml +++ b/.github/workflows/test-integrations-web-1.yml @@ -58,18 +58,6 @@ jobs: run: | set -x # print commands that are executed ./scripts/runtox.sh "py${{ matrix.python-version }}-django" - - name: Test flask - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-flask" - - name: Test starlette - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette" - - name: Test fastapi - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-web-2.yml b/.github/workflows/test-integrations-web-2.yml index 415f191aba..4bed53a034 100644 --- a/.github/workflows/test-integrations-web-2.yml +++ b/.github/workflows/test-integrations-web-2.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.14t","3.15","3.15t"] + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.13","3.14","3.14t","3.15","3.15t"] os: [ubuntu-22.04] env: # 3.6/3.7 run in the python:X.Y container; tell uv to use that system Python. @@ -37,46 +37,18 @@ jobs: - name: Setup Test Env run: | uv sync - - name: Test aiohttp + - name: Test flask run: | set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" - - name: Test asgi + ./scripts/runtox.sh "py${{ matrix.python-version }}-flask" + - name: Test starlette run: | set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" - - name: Test bottle + ./scripts/runtox.sh "py${{ matrix.python-version }}-starlette" + - name: Test fastapi run: | set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" - - name: Test falcon - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon" - - name: Test litestar - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-litestar" - - name: Test pyramid - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid" - - name: Test quart - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-quart" - - name: Test sanic - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic" - - name: Test starlite - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-starlite" - - name: Test tornado - run: | - set -x # print commands that are executed - ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado" + ./scripts/runtox.sh "py${{ matrix.python-version }}-fastapi" - name: Upload coverage data if: ${{ !cancelled() }} continue-on-error: true diff --git a/.github/workflows/test-integrations-web-3.yml b/.github/workflows/test-integrations-web-3.yml new file mode 100644 index 0000000000..5034ecfc11 --- /dev/null +++ b/.github/workflows/test-integrations-web-3.yml @@ -0,0 +1,93 @@ +# Do not edit this YAML file. This file is generated automatically by executing +# python scripts/split_tox_gh_actions/split_tox_gh_actions.py +# The template responsible for it is in +# scripts/split_tox_gh_actions/templates/base.jinja +name: Test Web 3 +# Reusable workflow. It is invoked by the top-level `test.yml` orchestrator. +on: + workflow_call: +permissions: + contents: read + actions: read +jobs: + test-web_3: + name: Web 3 + timeout-minutes: 30 + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13","3.14","3.14t","3.15","3.15t"] + os: [ubuntu-22.04] + env: + # 3.6/3.7 run in the python:X.Y container; tell uv to use that system Python. + TOX_UV_PYTHON_PREFERENCE: ${{ (matrix.python-version == '3.6' || matrix.python-version == '3.7') && 'only-system' || 'managed' }} + container: ${{ (matrix.python-version == '3.6' || matrix.python-version == '3.7') && format('python:{0}', matrix.python-version) || null }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install uv + uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3 + with: + enable-cache: false + - name: Mark workspace safe for git (3.6/3.7 container) + # needed to make git rev-parse work in the containers + # subprocesses (e.g. sentry_sdk.utils.get_git_revision) can run git. + if: ${{ matrix.python-version == '3.6' || matrix.python-version == '3.7' }} + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Setup Test Env + run: | + uv sync + - name: Test aiohttp + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-aiohttp" + - name: Test asgi + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-asgi" + - name: Test bottle + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-bottle" + - name: Test falcon + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-falcon" + - name: Test litestar + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-litestar" + - name: Test pyramid + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-pyramid" + - name: Test quart + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-quart" + - name: Test sanic + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-sanic" + - name: Test starlite + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-starlite" + - name: Test tornado + run: | + set -x # print commands that are executed + ./scripts/runtox.sh "py${{ matrix.python-version }}-tornado" + - name: Upload coverage data + if: ${{ !cancelled() }} + continue-on-error: true + uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + with: + name: coverage-web_3-${{ matrix.python-version }} + # .coverage-* / .junitxml-* are dotfiles, excluded by default + include-hidden-files: true + path: | + .coverage-sentry-* + .junitxml-* + if-no-files-found: 'ignore' + retention-days: 1 + overwrite: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 48064ee647..9bab8fb54d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -130,6 +130,11 @@ jobs: needs: files-changed if: ${{ needs.files-changed.outputs.code == 'true' }} uses: ./.github/workflows/test-integrations-web-2.yml + web_3: + name: Web 3 + needs: files-changed + if: ${{ needs.files-changed.outputs.code == 'true' }} + uses: ./.github/workflows/test-integrations-web-3.yml misc: name: Misc needs: files-changed @@ -153,6 +158,7 @@ jobs: - tasks - web_1 - web_2 + - web_3 - misc # Report whatever coverage exists, even if some test jobs failed. if: ${{ !cancelled() && needs.files-changed.outputs.code == 'true' }} @@ -201,6 +207,7 @@ jobs: - tasks - web_1 - web_2 + - web_3 - misc # Always run so it can gate merges even when a dependency failed. if: always() diff --git a/scripts/split_tox_gh_actions/split_tox_gh_actions.py b/scripts/split_tox_gh_actions/split_tox_gh_actions.py index 9a554ca820..64ff3c0d23 100755 --- a/scripts/split_tox_gh_actions/split_tox_gh_actions.py +++ b/scripts/split_tox_gh_actions/split_tox_gh_actions.py @@ -147,11 +147,13 @@ ], "Web 1": [ "django", + ], + "Web 2": [ "flask", "starlette", "fastapi", ], - "Web 2": [ + "Web 3": [ "aiohttp", "asgi", "bottle", diff --git a/tox.ini b/tox.ini index 3d7e59bdbf..42a737b34f 100644 --- a/tox.ini +++ b/tox.ini @@ -312,6 +312,8 @@ envlist = {py3.12,py3.14,py3.15,py3.15t}-django-v6.1.3 {py3.12,py3.14,py3.15,py3.15t}-django-latest + + # ~~~ Web 2 ~~~ {py3.6,py3.7,py3.8}-flask-v1.1.4 {py3.8,py3.14,py3.15,py3.15t}-flask-v2.3.3 {py3.9,py3.14,py3.15,py3.15t}-flask-v3.1.3 @@ -329,7 +331,7 @@ envlist = {py3.11,py3.14,py3.15,py3.15t}-fastapi-latest - # ~~~ Web 2 ~~~ + # ~~~ Web 3 ~~~ {py3.7}-aiohttp-v3.4.4 {py3.7,py3.8,py3.9}-aiohttp-v3.7.4 {py3.8,py3.12,py3.13}-aiohttp-v3.10.11 @@ -16834,6 +16836,8 @@ deps = {py3.14,py3.14t}-django: coverage==7.11.0 django-latest: pytest-asyncio + + # ~~~ Web 2 ~~~ flask-v1.1.4: flask==1.1.4 py3.8-flask-v1.1.4: Flask-Login==0.6.3 @@ -17742,7 +17746,7 @@ deps = {py3.6}-fastapi: aiocontextvars - # ~~~ Web 2 ~~~ + # ~~~ Web 3 ~~~ aiohttp-v3.4.4: aiohttp==3.4.4 aiohttp-v3.7.4: aiohttp==3.7.4