diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index da129836..1147ecf5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,14 +7,14 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Build wheel and source tarball run: | pip install wheel diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 39f5cf0c..86f2468b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -4,14 +4,14 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies run: | python -m pip install --upgrade pip wheel diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7588a997..f67d0b6f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -8,8 +8,8 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8"] - os: [ubuntu-20.04, windows-latest] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10"] + os: [ubuntu-24.04, windows-latest] exclude: - os: windows-latest python-version: "3.9" @@ -20,12 +20,12 @@ jobs: - os: windows-latest python-version: "3.12" - os: windows-latest - python-version: "pypy3.8" + python-version: "pypy3.10" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install dependencies @@ -38,18 +38,18 @@ jobs: TOXENV: ${{ matrix.toxenv }} single_extra: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: dependency: ["aiohttp", "requests", "httpx", "websockets"] steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install dependencies with only ${{ matrix.dependency }} extra dependency run: | python -m pip install --upgrade pip wheel @@ -58,14 +58,14 @@ jobs: run: pytest tests --${{ matrix.dependency }}-only coverage: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.8 - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.12 - name: Install test dependencies run: | python -m pip install --upgrade pip wheel @@ -73,4 +73,7 @@ jobs: - name: Test with coverage run: pytest --cov=gql --cov-report=xml --cov-report=term-missing tests - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/setup.py b/setup.py index 7ca66ae3..132f6ead 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ "parse==1.15.0", "pytest==7.4.2", "pytest-asyncio==0.21.1", - "pytest-console-scripts==1.3.1", + "pytest-console-scripts==1.4.1", "pytest-cov==5.0.0", "vcrpy==4.4.0", "aiofiles", @@ -26,7 +26,7 @@ dev_requires = [ "black==22.3.0", "check-manifest>=0.42,<1", - "flake8==3.8.1", + "flake8==7.1.1", "isort==4.3.21", "mypy==1.10", "sphinx>=5.3.0,<6", diff --git a/tests/test_aiohttp.py b/tests/test_aiohttp.py index b16964d0..55b08260 100644 --- a/tests/test_aiohttp.py +++ b/tests/test_aiohttp.py @@ -1162,7 +1162,8 @@ def test_code(): monkeypatch.setattr("sys.stdin", io.StringIO(query1_str)) ret = script_runner.run( - "gql-cli", url, "--verbose", stdin=io.StringIO(query1_str) + ["gql-cli", url, "--verbose"], + stdin=io.StringIO(query1_str), ) assert ret.success diff --git a/tests/test_cli.py b/tests/test_cli.py index cdbe07f9..88d1f533 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -372,7 +372,7 @@ def test_cli_get_transport_no_protocol(parser): @pytest.mark.script_launch_mode("subprocess") def test_cli_ep_version(script_runner): - ret = script_runner.run("gql-cli", "--version") + ret = script_runner.run(["gql-cli", "--version"]) assert ret.success diff --git a/tests/test_httpx_async.py b/tests/test_httpx_async.py index 3665f5d8..17be0db5 100644 --- a/tests/test_httpx_async.py +++ b/tests/test_httpx_async.py @@ -1036,7 +1036,8 @@ def test_code(): monkeypatch.setattr("sys.stdin", io.StringIO(query1_str)) ret = script_runner.run( - "gql-cli", url, "--verbose", stdin=io.StringIO(query1_str) + ["gql-cli", url, "--verbose"], + stdin=io.StringIO(query1_str), ) assert ret.success diff --git a/tox.ini b/tox.ini index 7a639572..308aba00 100644 --- a/tox.ini +++ b/tox.ini @@ -32,37 +32,37 @@ commands = py{38}: pytest {posargs:tests --cov-report=term-missing --cov=gql} [testenv:black] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = black --check gql tests [testenv:flake8] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = flake8 gql tests [testenv:import-order] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = isort --recursive --check-only --diff gql tests [testenv:mypy] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = mypy gql tests [testenv:docs] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = sphinx-build -b html -nEW docs docs/_build/html [testenv:manifest] -basepython = python3.8 +basepython = python deps = -e.[dev] commands = check-manifest -v