diff --git a/.github/workflows/lint-flake8.yml b/.github/workflows/lint-flake8.yml index bacbe03e..1dea49af 100644 --- a/.github/workflows/lint-flake8.yml +++ b/.github/workflows/lint-flake8.yml @@ -1,9 +1,9 @@ name: Lint with flake8 -on: [push, pull_request] +on: [push] jobs: - lint: + lint-flake8: runs-on: ubuntu-latest strategy: @@ -20,10 +20,10 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} + key: lint-flake8-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - ${{ runner.os }}-pip- + lint-flake8-${{ runner.os }}-pip-${{ matrix.python-version }} + lint-flake8-${{ runner.os }}-pip- - name: Install dependencies run: | python -m pip install -U pip setuptools diff --git a/.github/workflows/lint-towncrier.yml b/.github/workflows/lint-towncrier.yml new file mode 100644 index 00000000..50c6d23d --- /dev/null +++ b/.github/workflows/lint-towncrier.yml @@ -0,0 +1,35 @@ +name: Check existence of news fragment + +on: [pull_request] + +jobs: + lint-towncrier: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Cache pip packages + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: lint-towncrier-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.cfg') }} + restore-keys: | + lint-towncrier-${{ runner.os }}-pip-${{ matrix.python-version }} + lint-towncrier-${{ runner.os }}-pip- + - name: Install dependencies + run: | + python -m pip install -U pip setuptools + python -m pip install -U -r requirements/build.txt + - name: Check existence of news fragment + run: | + git fetch --no-tags origin +refs/heads/${BASE_BRANCH}:refs/remotes/origin/${BASE_BRANCH} + python -m towncrier.check --compare-with=origin/${BASE_BRANCH} + env: + BASE_BRANCH: ${{ github.base_ref }} diff --git a/.github/workflows/test-pytest.yml b/.github/workflows/test-pytest.yml index 8a467355..27bd5aab 100644 --- a/.github/workflows/test-pytest.yml +++ b/.github/workflows/test-pytest.yml @@ -21,14 +21,25 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} + key: test-pytest-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - ${{ runner.os }}-pip- + test-pytest-${{ runner.os }}-pip-${{ matrix.python-version }} + test-pytest-${{ runner.os }}-pip- - name: Install dependencies run: | python -m pip install -U pip setuptools python -m pip install -U -r requirements/test.txt + python <>> Patching aioresponses #174 manually") + t = p.read_text() + t = t.replace("return StreamReader(protocol, loop=loop)", "return StreamReader(protocol, limit=2 ** 16, loop=loop)") + p.write_text(t) + EOF + shell: bash - name: Test with pytest run: | python -m pytest -v --cov=src -m 'not integration' tests diff --git a/.github/workflows/typecheck-mypy.yml b/.github/workflows/typecheck-mypy.yml index 843bbc3f..7ded4915 100644 --- a/.github/workflows/typecheck-mypy.yml +++ b/.github/workflows/typecheck-mypy.yml @@ -3,7 +3,7 @@ name: Type check with mypy on: [push, pull_request] jobs: - typecheck: + typecheck-mypy: runs-on: ubuntu-latest strategy: @@ -20,10 +20,10 @@ jobs: uses: actions/cache@v2 with: path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} + key: typecheck-mypy-${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }} restore-keys: | - ${{ runner.os }}-pip-${{ matrix.python-version }} - ${{ runner.os }}-pip- + typecheck-mypy-${{ runner.os }}-pip-${{ matrix.python-version }} + typecheck-mypy-${{ runner.os }}-pip- - name: Install dependencies run: | python -m pip install -U pip setuptools diff --git a/changes/142.misc b/changes/142.misc new file mode 100644 index 00000000..a4e5dd12 --- /dev/null +++ b/changes/142.misc @@ -0,0 +1 @@ +Update dependencies (including aiohttp 3.7.1) and CI workflows to use `towncrier.check` instead of the psf-chronogrphaer app diff --git a/requirements/build.txt b/requirements/build.txt new file mode 100644 index 00000000..b7a3c3f3 --- /dev/null +++ b/requirements/build.txt @@ -0,0 +1 @@ +-e .[build] diff --git a/setup.py b/setup.py index 8ab1da37..a4aee484 100644 --- a/setup.py +++ b/setup.py @@ -8,21 +8,21 @@ ] install_requires = [ 'backend.ai-cli~=0.4.1', - 'aiohttp~=3.6.2', + 'aiohttp~=3.7.1', 'aiotusclient~=0.1.3', 'appdirs~=1.4.3', 'async_timeout~=3.0', # to avoid pip10 resolver issue - 'attrs>=19.3', # to avoid pip10 resolver issue - 'click~=7.1.1', + 'attrs>=20.1', # to avoid pip10 resolver issue + 'click~=7.1.2', 'colorama~=0.4.3', - 'humanize~=1.0.0', - 'janus~=0.5.0', + 'humanize~=3.1.0', + 'janus~=0.6.0', 'multidict~=4.7.4', 'python-dateutil~=2.8.1', 'PyYAML~=5.3.1', 'tabulate~=0.8.6', 'tqdm~=4.48', - 'yarl~=1.5.1', + 'yarl~=1.6.1', 'typing-extensions~=3.7.4', ] build_requires = [ @@ -31,11 +31,11 @@ 'towncrier>=19.2.0', ] test_requires = [ - 'pytest~=5.4.2', + 'pytest~=6.1.1', 'pytest-cov', 'pytest-mock', 'pytest-asyncio>=0.12.0', - 'aioresponses~=0.6.3', + 'aioresponses~=0.7.0', 'asynctest>=0.13; python_version<"3.8"', 'codecov', ]