From 8a68111ce5c0417835ec9a0d29186b4b3dde5671 Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sat, 14 Nov 2020 20:03:50 +0300 Subject: [PATCH] Closes #529 (#530) * Closes #529 * Fixing CI * Fixing CI * new monorepo setup --- .github/workflows/misspel.yml | 19 ++++++++++ .github/workflows/test.yml | 67 +++++++++++++++++++++++++++++++++ .travis.yml | 57 ---------------------------- django_stubs_ext/mypy.ini | 14 ------- django_stubs_ext/pyproject.toml | 8 ---- django_stubs_ext/pytest.ini | 8 ---- django_stubs_ext/setup.cfg | 5 --- 7 files changed, 86 insertions(+), 92 deletions(-) create mode 100644 .github/workflows/misspel.yml create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml delete mode 100644 django_stubs_ext/mypy.ini delete mode 100644 django_stubs_ext/pyproject.toml delete mode 100644 django_stubs_ext/pytest.ini diff --git a/.github/workflows/misspel.yml b/.github/workflows/misspel.yml new file mode 100644 index 0000000..83966ab --- /dev/null +++ b/.github/workflows/misspel.yml @@ -0,0 +1,19 @@ +name: misspell + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: sobolevn/misspell-fixer-action@0.1.0 + - uses: peter-evans/create-pull-request@v2.4.4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: 'Fixes by misspell-fixer' + title: 'Typos fix by misspell-fixer' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..4054c04 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,67 @@ +name: test + +on: [push, pull_request, workflow_dispatch] + + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.9'] + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install -U pip setuptools wheel + pip install -r ./dev-requirements.txt + + - name: Run pre-commit + run: pre-commit install && pre-commit run --all-files + + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.7'] + steps: + - uses: actions/checkout@v2 + - name: Setup system dependencies + run: sudo apt-get install binutils libproj-dev gdal-bin + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install -U pip setuptools wheel + pip install -r ./dev-requirements.txt + + - name: Run tests + run: pytest + + typecheck: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.6', '3.7', '3.8', '3.9'] + django-version: ['2.2', '3.0'] + steps: + - uses: actions/checkout@v2 + - name: Setup system dependencies + run: sudo apt-get install binutils libproj-dev gdal-bin + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install -U pip setuptools wheel + pip install -r ./dev-requirements.txt + + - name: Run tests + run: python ./scripts/typecheck_tests.py --django_version="${{ matrix.django-version }}" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 185df13..0000000 --- a/.travis.yml +++ /dev/null @@ -1,57 +0,0 @@ -language: python -cache: pip -dist: xenial -sudo: required - -jobs: - include: - - name: Typecheck Django 3.0 test suite with python 3.9-dev - python: 3.9-dev - script: | - python ./scripts/typecheck_tests.py --django_version=3.0 - - name: Typecheck Django 3.0 test suite with python 3.8 - python: 3.8 - script: | - python ./scripts/typecheck_tests.py --django_version=3.0 - - name: Typecheck Django 3.0 test suite with python 3.7 - python: 3.7 - script: | - python ./scripts/typecheck_tests.py --django_version=3.0 - - name: Typecheck Django 3.0 test suite with python 3.6 - python: 3.6 - script: | - python ./scripts/typecheck_tests.py --django_version=3.0 - - - name: Typecheck Django 2.2 test suite with python 3.9-dev - python: 3.9-dev - script: | - python ./scripts/typecheck_tests.py --django_version=2.2 - - name: Typecheck Django 2.2 test suite with python 3.8 - python: 3.8 - script: | - python ./scripts/typecheck_tests.py --django_version=2.2 - - name: Typecheck Django 2.2 test suite with python 3.7 - python: 3.7 - script: | - python ./scripts/typecheck_tests.py --django_version=2.2 - - name: Typecheck Django 2.2 test suite with python 3.6 - python: 3.6 - script: | - python ./scripts/typecheck_tests.py --django_version=2.2 - - - name: Lint using pre-commit - python: 3.9-dev - script: - - pre-commit install && pre-commit run --all-files - - - name: Run plugin test suite with python 3.9-dev - python: 3.9-dev - script: pytest - -before_install: | - sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable -y - sudo apt-get update - sudo apt-get install -y binutils libproj-dev gdal-bin - pip install -U pip setuptools wheel -install: | - pip install -r ./dev-requirements.txt diff --git a/django_stubs_ext/mypy.ini b/django_stubs_ext/mypy.ini deleted file mode 100644 index c6f0e17..0000000 --- a/django_stubs_ext/mypy.ini +++ /dev/null @@ -1,14 +0,0 @@ -[mypy] -strict_optional = True -ignore_missing_imports = True -check_untyped_defs = True -warn_no_return = False -show_traceback = True -allow_redefinition = True -incremental = True - -plugins = - mypy_django_plugin.main - -[mypy.plugins.django-stubs] -django_settings_module = scripts.django_tests_settings diff --git a/django_stubs_ext/pyproject.toml b/django_stubs_ext/pyproject.toml deleted file mode 100644 index 6fd75a0..0000000 --- a/django_stubs_ext/pyproject.toml +++ /dev/null @@ -1,8 +0,0 @@ -[tool.black] -line-length = 120 -include = '\.pyi?$' - -[tool.isort] -line_length = 120 -multi_line_output = 3 -include_trailing_comma = true diff --git a/django_stubs_ext/pytest.ini b/django_stubs_ext/pytest.ini deleted file mode 100644 index 3dd3f06..0000000 --- a/django_stubs_ext/pytest.ini +++ /dev/null @@ -1,8 +0,0 @@ -[pytest] -testpaths = - ./tests -addopts = - --tb=native - -s - -v - --cache-clear diff --git a/django_stubs_ext/setup.cfg b/django_stubs_ext/setup.cfg index 55a0a02..c413893 100644 --- a/django_stubs_ext/setup.cfg +++ b/django_stubs_ext/setup.cfg @@ -1,7 +1,2 @@ -[flake8] -exclude = .*/ -select = F401, Y -max_line_length = 120 - [metadata] license_file = ../LICENSE.txt