Skip to content

Commit c3b722e

Browse files
authored
chore: upgrade GitHub workflows (#506)
1 parent e355261 commit c3b722e

File tree

8 files changed

+42
-37
lines changed

8 files changed

+42
-37
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ on:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-24.04
1111

1212
steps:
13-
- uses: actions/checkout@v3
14-
- name: Set up Python 3.8
15-
uses: actions/setup-python@v4
13+
- uses: actions/checkout@v4
14+
- name: Set up Python 3.12
15+
uses: actions/setup-python@v5
1616
with:
17-
python-version: 3.8
17+
python-version: 3.12
1818
- name: Build wheel and source tarball
1919
run: |
2020
pip install wheel

.github/workflows/lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ on: [push, pull_request]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-24.04
88

99
steps:
10-
- uses: actions/checkout@v3
11-
- name: Set up Python 3.8
12-
uses: actions/setup-python@v4
10+
- uses: actions/checkout@v4
11+
- name: Set up Python 3.12
12+
uses: actions/setup-python@v5
1313
with:
14-
python-version: 3.8
14+
python-version: 3.12
1515
- name: Install dependencies
1616
run: |
1717
python -m pip install --upgrade pip wheel

.github/workflows/tests.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ jobs:
88
strategy:
99
max-parallel: 4
1010
matrix:
11-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.8"]
12-
os: [ubuntu-20.04, windows-latest]
11+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.10"]
12+
os: [ubuntu-24.04, windows-latest]
1313
exclude:
1414
- os: windows-latest
1515
python-version: "3.9"
@@ -20,12 +20,12 @@ jobs:
2020
- os: windows-latest
2121
python-version: "3.12"
2222
- os: windows-latest
23-
python-version: "pypy3.8"
23+
python-version: "pypy3.10"
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2727
- name: Set up Python ${{ matrix.python-version }}
28-
uses: actions/setup-python@v4
28+
uses: actions/setup-python@v5
2929
with:
3030
python-version: ${{ matrix.python-version }}
3131
- name: Install dependencies
@@ -38,18 +38,18 @@ jobs:
3838
TOXENV: ${{ matrix.toxenv }}
3939

4040
single_extra:
41-
runs-on: ubuntu-20.04
41+
runs-on: ubuntu-24.04
4242
strategy:
4343
fail-fast: false
4444
matrix:
4545
dependency: ["aiohttp", "requests", "httpx", "websockets"]
4646

4747
steps:
48-
- uses: actions/checkout@v3
49-
- name: Set up Python 3.8
50-
uses: actions/setup-python@v4
48+
- uses: actions/checkout@v4
49+
- name: Set up Python 3.12
50+
uses: actions/setup-python@v5
5151
with:
52-
python-version: 3.8
52+
python-version: 3.12
5353
- name: Install dependencies with only ${{ matrix.dependency }} extra dependency
5454
run: |
5555
python -m pip install --upgrade pip wheel
@@ -58,19 +58,22 @@ jobs:
5858
run: pytest tests --${{ matrix.dependency }}-only
5959

6060
coverage:
61-
runs-on: ubuntu-20.04
61+
runs-on: ubuntu-24.04
6262

6363
steps:
64-
- uses: actions/checkout@v3
65-
- name: Set up Python 3.8
66-
uses: actions/setup-python@v4
64+
- uses: actions/checkout@v4
65+
- name: Set up Python 3.12
66+
uses: actions/setup-python@v5
6767
with:
68-
python-version: 3.8
68+
python-version: 3.12
6969
- name: Install test dependencies
7070
run: |
7171
python -m pip install --upgrade pip wheel
7272
pip install -e.[test]
7373
- name: Test with coverage
7474
run: pytest --cov=gql --cov-report=xml --cov-report=term-missing tests
7575
- name: Upload coverage to Codecov
76-
uses: codecov/codecov-action@v1
76+
uses: codecov/codecov-action@v4
77+
with:
78+
fail_ci_if_error: false
79+
token: ${{ secrets.CODECOV_TOKEN }}

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"parse==1.15.0",
1818
"pytest==7.4.2",
1919
"pytest-asyncio==0.21.1",
20-
"pytest-console-scripts==1.3.1",
20+
"pytest-console-scripts==1.4.1",
2121
"pytest-cov==5.0.0",
2222
"vcrpy==4.4.0",
2323
"aiofiles",
@@ -26,7 +26,7 @@
2626
dev_requires = [
2727
"black==22.3.0",
2828
"check-manifest>=0.42,<1",
29-
"flake8==3.8.1",
29+
"flake8==7.1.1",
3030
"isort==4.3.21",
3131
"mypy==1.10",
3232
"sphinx>=5.3.0,<6",

tests/test_aiohttp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,8 @@ def test_code():
11621162
monkeypatch.setattr("sys.stdin", io.StringIO(query1_str))
11631163

11641164
ret = script_runner.run(
1165-
"gql-cli", url, "--verbose", stdin=io.StringIO(query1_str)
1165+
["gql-cli", url, "--verbose"],
1166+
stdin=io.StringIO(query1_str),
11661167
)
11671168

11681169
assert ret.success

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def test_cli_get_transport_no_protocol(parser):
372372

373373
@pytest.mark.script_launch_mode("subprocess")
374374
def test_cli_ep_version(script_runner):
375-
ret = script_runner.run("gql-cli", "--version")
375+
ret = script_runner.run(["gql-cli", "--version"])
376376

377377
assert ret.success
378378

tests/test_httpx_async.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,8 @@ def test_code():
10361036
monkeypatch.setattr("sys.stdin", io.StringIO(query1_str))
10371037

10381038
ret = script_runner.run(
1039-
"gql-cli", url, "--verbose", stdin=io.StringIO(query1_str)
1039+
["gql-cli", url, "--verbose"],
1040+
stdin=io.StringIO(query1_str),
10401041
)
10411042

10421043
assert ret.success

tox.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,37 +32,37 @@ commands =
3232
py{38}: pytest {posargs:tests --cov-report=term-missing --cov=gql}
3333

3434
[testenv:black]
35-
basepython = python3.8
35+
basepython = python
3636
deps = -e.[dev]
3737
commands =
3838
black --check gql tests
3939

4040
[testenv:flake8]
41-
basepython = python3.8
41+
basepython = python
4242
deps = -e.[dev]
4343
commands =
4444
flake8 gql tests
4545

4646
[testenv:import-order]
47-
basepython = python3.8
47+
basepython = python
4848
deps = -e.[dev]
4949
commands =
5050
isort --recursive --check-only --diff gql tests
5151

5252
[testenv:mypy]
53-
basepython = python3.8
53+
basepython = python
5454
deps = -e.[dev]
5555
commands =
5656
mypy gql tests
5757

5858
[testenv:docs]
59-
basepython = python3.8
59+
basepython = python
6060
deps = -e.[dev]
6161
commands =
6262
sphinx-build -b html -nEW docs docs/_build/html
6363

6464
[testenv:manifest]
65-
basepython = python3.8
65+
basepython = python
6666
deps = -e.[dev]
6767
commands =
6868
check-manifest -v

0 commit comments

Comments
 (0)