Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 1 addition & 69 deletions .github/workflows/test-integrations-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,82 +22,14 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dist-serverless
jobs:
test-graphql-latest:
name: GraphQL (latest)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7","3.8","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup Test Env
run: |
pip install "coverage[toml]" tox
- name: Erase coverage
run: |
coverage erase
- name: Test ariadne latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-ariadne-latest"
- name: Test gql latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-gql-latest"
- name: Test graphene latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-graphene-latest"
- name: Test strawberry latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
# make sure no plugins alter our coverage reports
plugin: noop
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .junitxml
verbose: true
test-graphql-pinned:
name: GraphQL (pinned)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7","3.8","3.11","3.12"]
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
26 changes: 25 additions & 1 deletion scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,28 @@
#
# See scripts/populate_tox/README.md for more info on the format and examples.

TEST_SUITE_CONFIG = {}
TEST_SUITE_CONFIG = {
"ariadne": {
"package": "ariadne",
"deps": {
"*": ["fastapi", "flask", "httpx"],
},
"python": ">=3.8",
},
"gql": {
"package": "gql[all]",
},
"graphene": {
"package": "graphene",
"deps": {
"*": ["blinker", "fastapi", "flask", "httpx"],
"py3.6": ["aiocontextvars"],
},
},
"strawberry": {
"package": "strawberry-graphql[fastapi,flask]",
"deps": {
"*": ["httpx"],
},
},
}
14 changes: 5 additions & 9 deletions scripts/populate_tox/populate_tox.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"potel",
"aiohttp",
"anthropic",
"ariadne",
"arq",
"asgi",
"asyncpg",
Expand All @@ -76,8 +75,6 @@
"fastapi",
"flask",
"gcp",
"gql",
"graphene",
"grpc",
"httpx",
"huey",
Expand All @@ -104,7 +101,6 @@
"starlette",
"starlite",
"sqlalchemy",
"strawberry",
"tornado",
"trytond",
"typer",
Expand Down Expand Up @@ -464,7 +460,9 @@ def _compare_min_version_with_defined(
)


def _add_python_versions_to_release(integration: str, package: str, release: Version):
def _add_python_versions_to_release(
integration: str, package: str, release: Version
) -> None:
release_pypi_data = fetch_release(package, release)
time.sleep(0.1) # give PYPI some breathing room

Expand Down Expand Up @@ -522,10 +520,8 @@ def main() -> None:
test_releases = pick_releases_to_test(releases)

for release in test_releases:
py_versions = _add_python_versions_to_release(
integration, package, release
)
if not py_versions:
_add_python_versions_to_release(integration, package, release)
if not release.python_versions:
print(f" Release {release} has no Python versions, skipping.")

test_releases = [
Expand Down
44 changes: 0 additions & 44 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ envlist =
{py3.8,py3.11,py3.12}-anthropic-v{0.16,0.28,0.40}
{py3.7,py3.11,py3.12}-anthropic-latest

# Ariadne
{py3.8,py3.11}-ariadne-v{0.20}
{py3.8,py3.12,py3.13}-ariadne-latest

# Arq
{py3.7,py3.11}-arq-v{0.23}
{py3.7,py3.12,py3.13}-arq-latest
Expand Down Expand Up @@ -140,14 +136,6 @@ envlist =
# GCP
{py3.7}-gcp

# GQL
{py3.7,py3.11}-gql-v{3.4}
{py3.7,py3.12,py3.13}-gql-latest

# Graphene
{py3.7,py3.11}-graphene-v{3.3}
{py3.7,py3.12,py3.13}-graphene-latest

# gRPC
{py3.7,py3.9}-grpc-v{1.39}
{py3.7,py3.10}-grpc-v{1.49}
Expand Down Expand Up @@ -276,11 +264,6 @@ envlist =
{py3.7,py3.11}-sqlalchemy-v{2.0}
{py3.7,py3.12,py3.13}-sqlalchemy-latest

# Strawberry
{py3.8,py3.11}-strawberry-v{0.209}
{py3.8,py3.11,py3.12}-strawberry-v{0.222}
{py3.8,py3.12,py3.13}-strawberry-latest

# Tornado
{py3.8,py3.11,py3.12}-tornado-v{6.0}
{py3.8,py3.11,py3.12}-tornado-v{6.2}
Expand Down Expand Up @@ -362,13 +345,6 @@ deps =
anthropic-v0.40: anthropic~=0.40.0
anthropic-latest: anthropic

# Ariadne
ariadne-v0.20: ariadne~=0.20.0
ariadne-latest: ariadne
ariadne: fastapi
ariadne: flask
ariadne: httpx

# Arq
arq-v0.23: arq~=0.23.0
arq-v0.23: pydantic<2
Expand Down Expand Up @@ -495,18 +471,6 @@ deps =
flask-v3: Flask~=3.0
flask-latest: Flask

# GQL
gql-v{3.4}: gql[all]~=3.4.0
gql-latest: gql[all]

# Graphene
graphene: blinker
graphene: fastapi
graphene: flask
graphene: httpx
graphene-v{3.3}: graphene~=3.3.0
graphene-latest: graphene

# gRPC
grpc: protobuf
grpc: mypy-protobuf
Expand Down Expand Up @@ -731,14 +695,6 @@ deps =
sqlalchemy-v2.0: sqlalchemy~=2.0.0
sqlalchemy-latest: sqlalchemy

# Strawberry
strawberry: fastapi
strawberry: flask
strawberry: httpx
strawberry-v0.209: strawberry-graphql[fastapi,flask]~=0.209.0
strawberry-v0.222: strawberry-graphql[fastapi,flask]~=0.222.0
strawberry-latest: strawberry-graphql[fastapi,flask]

# Tornado
# Tornado <6.4.1 is incompatible with Pytest ≥8.2
# See https://github.com/tornadoweb/tornado/pull/3382.
Expand Down
89 changes: 45 additions & 44 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ envlist =
{py3.8,py3.11,py3.12}-anthropic-v{0.16,0.28,0.40}
{py3.7,py3.11,py3.12}-anthropic-latest

# Ariadne
{py3.8,py3.11}-ariadne-v{0.20}
{py3.8,py3.12,py3.13}-ariadne-latest

# Arq
{py3.7,py3.11}-arq-v{0.23}
{py3.7,py3.12,py3.13}-arq-latest
Expand Down Expand Up @@ -140,14 +136,6 @@ envlist =
# GCP
{py3.7}-gcp

# GQL
{py3.7,py3.11}-gql-v{3.4}
{py3.7,py3.12,py3.13}-gql-latest

# Graphene
{py3.7,py3.11}-graphene-v{3.3}
{py3.7,py3.12,py3.13}-graphene-latest

# gRPC
{py3.7,py3.9}-grpc-v{1.39}
{py3.7,py3.10}-grpc-v{1.49}
Expand Down Expand Up @@ -276,11 +264,6 @@ envlist =
{py3.7,py3.11}-sqlalchemy-v{2.0}
{py3.7,py3.12,py3.13}-sqlalchemy-latest

# Strawberry
{py3.8,py3.11}-strawberry-v{0.209}
{py3.8,py3.11,py3.12}-strawberry-v{0.222}
{py3.8,py3.12,py3.13}-strawberry-latest

# Tornado
{py3.8,py3.11,py3.12}-tornado-v{6.0}
{py3.8,py3.11,py3.12}-tornado-v{6.2}
Expand All @@ -305,6 +288,24 @@ envlist =
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.

# ~~~ GraphQL ~~~
{py3.8,py3.10,py3.11}-ariadne-v0.20.1
{py3.8,py3.11,py3.12}-ariadne-v0.22
{py3.8,py3.11,py3.12}-ariadne-v0.24.0
{py3.8,py3.11,py3.12}-ariadne-v0.25.2

{py3.6,py3.9,py3.10}-gql-v3.4.1
{py3.7,py3.11,py3.12}-gql-v3.5.0

{py3.6,py3.9,py3.10}-graphene-v3.3
{py3.8,py3.12,py3.13}-graphene-v3.4.3

{py3.8,py3.10,py3.11}-strawberry-v0.209.8
{py3.8,py3.11,py3.12}-strawberry-v0.226.2
{py3.8,py3.11,py3.12}-strawberry-v0.243.1
{py3.9,py3.12,py3.13}-strawberry-v0.259.0



[testenv]
deps =
Expand Down Expand Up @@ -352,13 +353,6 @@ deps =
anthropic-v0.40: anthropic~=0.40.0
anthropic-latest: anthropic

# Ariadne
ariadne-v0.20: ariadne~=0.20.0
ariadne-latest: ariadne
ariadne: fastapi
ariadne: flask
ariadne: httpx

# Arq
arq-v0.23: arq~=0.23.0
arq-v0.23: pydantic<2
Expand Down Expand Up @@ -485,18 +479,6 @@ deps =
flask-v3: Flask~=3.0
flask-latest: Flask

# GQL
gql-v{3.4}: gql[all]~=3.4.0
gql-latest: gql[all]

# Graphene
graphene: blinker
graphene: fastapi
graphene: flask
graphene: httpx
graphene-v{3.3}: graphene~=3.3.0
graphene-latest: graphene

# gRPC
grpc: protobuf
grpc: mypy-protobuf
Expand Down Expand Up @@ -721,14 +703,6 @@ deps =
sqlalchemy-v2.0: sqlalchemy~=2.0.0
sqlalchemy-latest: sqlalchemy

# Strawberry
strawberry: fastapi
strawberry: flask
strawberry: httpx
strawberry-v0.209: strawberry-graphql[fastapi,flask]~=0.209.0
strawberry-v0.222: strawberry-graphql[fastapi,flask]~=0.222.0
strawberry-latest: strawberry-graphql[fastapi,flask]

# Tornado
# Tornado <6.4.1 is incompatible with Pytest ≥8.2
# See https://github.com/tornadoweb/tornado/pull/3382.
Expand All @@ -754,6 +728,33 @@ deps =
# These come from the populate_tox.py script. Eventually we should move all
# integration tests there.

# ~~~ GraphQL ~~~
ariadne-v0.20.1: ariadne==0.20.1
ariadne-v0.22: ariadne==0.22
ariadne-v0.24.0: ariadne==0.24.0
ariadne-v0.25.2: ariadne==0.25.2
ariadne: fastapi
ariadne: flask
ariadne: httpx

gql-v3.4.1: gql[all]==3.4.1
gql-v3.5.0: gql[all]==3.5.0

graphene-v3.3: graphene==3.3
graphene-v3.4.3: graphene==3.4.3
graphene: blinker
graphene: fastapi
graphene: flask
graphene: httpx
py3.6-graphene: aiocontextvars

strawberry-v0.209.8: strawberry-graphql[fastapi,flask]==0.209.8
strawberry-v0.226.2: strawberry-graphql[fastapi,flask]==0.226.2
strawberry-v0.243.1: strawberry-graphql[fastapi,flask]==0.243.1
strawberry-v0.259.0: strawberry-graphql[fastapi,flask]==0.259.0
strawberry: httpx



setenv =
PYTHONDONTWRITEBYTECODE=1
Expand Down
Loading