Skip to content

Commit

Permalink
Properly use the tox-gh-actions plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Nov 7, 2021
1 parent f145dc9 commit 0ac79de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox "poetry>=1.1,<2"
poetry install
pip install tox tox-gh-actions
- name: Run unit tests with tox
run: tox
env:
TOXENV: py

13 changes: 9 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
envlist = py3{6,7,8,9,10}, black, flake8, mypy, docs, manifest
isolated_build = true

[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310

[testenv:black]
basepython = python3.9
deps = black==21.10b0
Expand Down Expand Up @@ -37,7 +45,6 @@ commands =
check-manifest -v

[testenv]
whitelist_externals = poetry
setenv =
PYTHONPATH = {toxinidir}
deps =
Expand All @@ -49,6 +56,4 @@ deps =
pytest-timeout>=1.4,<2
py36,py37: typing-extensions>=3.10,<4
commands =
pip uninstall -qqy graphql-core
poetry install
poetry run pytest tests {posargs: --cov-report=term-missing --cov=graphql --cov=tests --cov-fail-under=100}
pytest tests {posargs: --cov-report=term-missing --cov=graphql --cov=tests --cov-fail-under=100}

0 comments on commit 0ac79de

Please sign in to comment.