Support Python 3.6 and test in CI
This commit is contained in:
parent
171962d948
commit
770dca45d1
34
.github/workflows/test.yml
vendored
Normal file
34
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
name: test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest,windows-latest]
|
||||
python-version: [3.6, 3.8]
|
||||
|
||||
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: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install poetry
|
||||
python -m poetry install
|
||||
|
||||
- name: Run mypy
|
||||
run: |
|
||||
python -m poetry run mypy .
|
||||
|
||||
- name: Run flake8
|
||||
run: |
|
||||
python -m poetry run flake8 .
|
||||
13
autobuild.py
13
autobuild.py
@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
import os
|
||||
import argparse
|
||||
@ -113,10 +111,10 @@ class Package(dict):
|
||||
build_types.append("msys-src")
|
||||
return build_types
|
||||
|
||||
def get_depends(self, build_type) -> Set[Package]:
|
||||
def get_depends(self, build_type) -> "Set[Package]":
|
||||
return self['ext-depends'].get(build_type, set())
|
||||
|
||||
def get_rdepends(self, build_type) -> Set[Package]:
|
||||
def get_rdepends(self, build_type) -> "Set[Package]":
|
||||
return self['ext-rdepends'].get(build_type, set())
|
||||
|
||||
def get_repo_type(self) -> str:
|
||||
@ -158,13 +156,18 @@ def get_current_run_url() -> Optional[str]:
|
||||
return None
|
||||
|
||||
|
||||
def shlex_join(split_command: List[str]) -> str:
|
||||
# shlex.join got added in 3.8 while we support 3.6
|
||||
return ' '.join(shlex.quote(arg) for arg in split_command)
|
||||
|
||||
|
||||
def run_cmd(msys2_root: _PathLike, args, **kwargs):
|
||||
executable = os.path.join(msys2_root, 'usr', 'bin', 'bash.exe')
|
||||
env = kwargs.pop("env", os.environ.copy())
|
||||
env["CHERE_INVOKING"] = "1"
|
||||
env["MSYSTEM"] = "MSYS"
|
||||
env["MSYS2_PATH_TYPE"] = "minimal"
|
||||
check_call([executable, '-lc'] + [shlex.join([str(a) for a in args])], env=env, **kwargs)
|
||||
check_call([executable, '-lc'] + [shlex_join([str(a) for a in args])], env=env, **kwargs)
|
||||
|
||||
|
||||
@contextmanager
|
||||
|
||||
10
poetry.lock
generated
10
poetry.lock
generated
@ -190,7 +190,7 @@ python-versions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "urllib3"
|
||||
version = "1.26.2"
|
||||
version = "1.26.3"
|
||||
description = "HTTP library with thread-safe connection pooling, file post, and more."
|
||||
category = "main"
|
||||
optional = false
|
||||
@ -223,8 +223,8 @@ testing = ["pytest (>=3.5,!=3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake
|
||||
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = "^3.7"
|
||||
content-hash = "3ca46922ef0093183b676494694d14b914e71297364cb765d99bb38fea178420"
|
||||
python-versions = "^3.6"
|
||||
content-hash = "3bbf0f27173c8130312e55c4cc5262698a9b850f850f21c86b7f9a08069d92ce"
|
||||
|
||||
[metadata.files]
|
||||
certifi = [
|
||||
@ -337,8 +337,8 @@ typing-extensions = [
|
||||
{file = "typing_extensions-3.7.4.3.tar.gz", hash = "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c"},
|
||||
]
|
||||
urllib3 = [
|
||||
{file = "urllib3-1.26.2-py2.py3-none-any.whl", hash = "sha256:d8ff90d979214d7b4f8ce956e80f4028fc6860e4431f731ea4a8c08f23f99473"},
|
||||
{file = "urllib3-1.26.2.tar.gz", hash = "sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08"},
|
||||
{file = "urllib3-1.26.3-py2.py3-none-any.whl", hash = "sha256:1b465e494e3e0d8939b50680403e3aedaa2bc434b7d5af64dfd3c958d7f5ae80"},
|
||||
{file = "urllib3-1.26.3.tar.gz", hash = "sha256:de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73"},
|
||||
]
|
||||
wrapt = [
|
||||
{file = "wrapt-1.12.1.tar.gz", hash = "sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7"},
|
||||
|
||||
@ -5,7 +5,7 @@ description = ""
|
||||
authors = ["Christoph Reiter <reiter.christoph@gmail.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.7"
|
||||
python = "^3.6"
|
||||
PyGithub = "^1.54.1"
|
||||
tabulate = "^0.8.7"
|
||||
requests = "^2.25.1"
|
||||
|
||||
@ -22,8 +22,8 @@ requests==2.25.1; (python_version >= "2.7" and python_full_version < "3.0.0") or
|
||||
tabulate==0.8.7 \
|
||||
--hash=sha256:ac64cb76d53b1231d364babcd72abbb16855adac7de6665122f97b593f1eb2ba \
|
||||
--hash=sha256:db2723a20d04bcda8522165c73eea7c300eda74e0ce852d9022e0159d7895007
|
||||
urllib3==1.26.2; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4" and python_version >= "3.6" \
|
||||
--hash=sha256:d8ff90d979214d7b4f8ce956e80f4028fc6860e4431f731ea4a8c08f23f99473 \
|
||||
--hash=sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08
|
||||
urllib3==1.26.3; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4" and python_version >= "3.6" \
|
||||
--hash=sha256:1b465e494e3e0d8939b50680403e3aedaa2bc434b7d5af64dfd3c958d7f5ae80 \
|
||||
--hash=sha256:de3eedaad74a2683334e282005cd8d7f22f4d55fa690a2a1020a416cb0a47e73
|
||||
wrapt==1.12.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.4.0" and python_version >= "3.6" \
|
||||
--hash=sha256:b62ffa81fb85f4332a4f609cab4ac40709470da05643a082ec1eb88e6d9b97d7
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user