From 821b1325f89ec8f1367887676aa60162875af9dd Mon Sep 17 00:00:00 2001 From: Max Morlocke Date: Wed, 7 Apr 2021 22:33:12 -0400 Subject: [PATCH] Setup testing workflow (#1) * ensure dependencies installed * apply black changes * minor black changes * explicitly set black line length --- .github/workflows/main.yml | 4 ++-- tests/conftest.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c8f2309..1ee3b34 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e .[asgi-file-uploads] + pip install -r requirements.txt pip install -r requirements-dev.txt - name: Pytest run: | @@ -31,5 +31,5 @@ jobs: run: | pylint ariadne_django tests setup.py mypy ariadne_django --ignore-missing-imports - black --check . + black -l 120 --check . isort -c . diff --git a/tests/conftest.py b/tests/conftest.py index 1249496..1774c73 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -25,6 +25,7 @@ def pytest_configure(): def request_factory(): return RequestFactory() + @pytest.fixture def type_defs(): return """ @@ -124,9 +125,7 @@ def subscriptions(): @pytest.fixture def schema(type_defs, resolvers, mutations, subscriptions): - return make_executable_schema( - type_defs, [resolvers, mutations, subscriptions, upload_scalar] - ) + return make_executable_schema(type_defs, [resolvers, mutations, subscriptions, upload_scalar]) @pytest.fixture