* Closes #529

* Fixing CI

* Fixing CI

* new monorepo setup
This commit is contained in:
Nikita Sobolev
2020-11-14 20:03:50 +03:00
committed by GitHub
parent 9f966a8056
commit 8a68111ce5
7 changed files with 86 additions and 92 deletions

19
.github/workflows/misspel.yml vendored Normal file
View File

@@ -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'

67
.github/workflows/test.yml vendored Normal file
View File

@@ -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 }}"

View File

@@ -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

View File

@@ -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

View File

@@ -1,8 +0,0 @@
[tool.black]
line-length = 120
include = '\.pyi?$'
[tool.isort]
line_length = 120
multi_line_output = 3
include_trailing_comma = true

View File

@@ -1,8 +0,0 @@
[pytest]
testpaths =
./tests
addopts =
--tb=native
-s
-v
--cache-clear

View File

@@ -1,7 +1,2 @@
[flake8]
exclude = .*/
select = F401, Y
max_line_length = 120
[metadata]
license_file = ../LICENSE.txt