Skip to content

Commit 0a1b765

Browse files
committed
Try using tox-gh-actions and GH actions version matrix
1 parent ad50f87 commit 0a1b765

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/tests.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@ jobs:
55
linters:
66
name: lint
77
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
python-version: [3.7, 3.8]
811
steps:
912
- uses: actions/checkout@master
1013
- name: Install
1114
uses: abatilo/[email protected]
1215
with:
13-
python_version: 3.8
16+
python-version: ${{ matrix.python-version }}
1417
poetry_version: 1.0
1518
args: install
1619
- name: Lint with pre-commit
1720
uses: abatilo/[email protected]
1821
with:
19-
python_version: 3.8
22+
python-version: ${{ matrix.python-version }}
2023
poetry_version: 1.0
2124
args: run pre-commit run --all-files
2225
pytest:
@@ -27,12 +30,13 @@ jobs:
2730
- name: Install
2831
uses: abatilo/[email protected]
2932
with:
30-
python_version: 3.8
33+
python-version: ${{ matrix.python-version }}
3134
poetry_version: 1.0
3235
args: install
3336
- name: Run matrix of tests with Tox
3437
uses: abatilo/[email protected]
3538
with:
36-
python_version: 3.8
39+
python-version: ${{ matrix.python-version }}
3740
poetry_version: 1.0
3841
args: run tox
42+

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ tox = "~3.12.0" # sync with tox.ini
3131
mypy = "0.720"
3232
black = "19.3b0"
3333
pre-commit = "~1.17.0"
34+
tox-gh-actions = "^1.3.0"
3435

3536
[build-system]
3637
requires = ["poetry>=0.12"]

tox.ini

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ deps =
1414
pytest-cov
1515
commands =
1616
pytest tests/ --cov-report=term-missing --cov=graphene_pydantic {posargs}
17+
18+
[gh-actions]
19+
python =
20+
3.7: py37
21+
3.8: py38, mypy

0 commit comments

Comments
 (0)