Skip to content

Commit

Permalink
Merge 1ae6102 into 8d45646
Browse files Browse the repository at this point in the history
  • Loading branch information
playpauseandstop committed Jan 3, 2023
2 parents 8d45646 + 1ae6102 commit e4d52d5
Show file tree
Hide file tree
Showing 13 changed files with 775 additions and 741 deletions.
4 changes: 2 additions & 2 deletions .github/actions/install_badabump/action.yml
Expand Up @@ -5,14 +5,14 @@ inputs:
badabump-version:
description: "Badabump version to use"
required: false
default: "21.3.3"
default: "22.1.0"

runs:
using: "composite"
steps:
- id: "python"
name: "Install Python"
uses: "actions/setup-python@v4.3.1"
uses: "actions/setup-python@v4.4.0"
with:
python-version-file: ".python-version"

Expand Down
6 changes: 3 additions & 3 deletions .github/actions/install_python_and_poetry/action.yml
Expand Up @@ -18,7 +18,7 @@ inputs:
poetry-version:
description: "Poetry version to use"
required: false
default: "1.3.0"
default: "1.3.1"

outputs:
python-path:
Expand All @@ -39,7 +39,7 @@ runs:
steps:
- id: "python"
name: "Install Python"
uses: "actions/setup-python@v4.3.1"
uses: "actions/setup-python@v4.4.0"
with:
python-version: "${{ inputs.python-version }}"
python-version-file: "${{ inputs.python-version-file }}"
Expand All @@ -49,7 +49,7 @@ runs:
run: "pipx install --python='${{ steps.python.outputs.python-path }}' poetry==${{ inputs.poetry-version }}"

- name: "Cache venv"
uses: "actions/cache@v3.0.11"
uses: "actions/cache@v3.2.2"
with:
path: "./.venv/"
key: "venv-${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}${{ inputs.cache-key-suffix }}"
2 changes: 1 addition & 1 deletion .github/actions/run_pre_commit/action.yml
Expand Up @@ -14,7 +14,7 @@ runs:
shell: "bash"

- name: "Cache mypy"
uses: "actions/cache@v3.0.11"
uses: "actions/cache@v3.2.2"
with:
path: "./.mypy_cache/"
key: "mypy-${{ runner.os }}-${{ inputs.python-version }}"
Expand Down
11 changes: 8 additions & 3 deletions .github/actions/run_tox/action.yml
Expand Up @@ -5,21 +5,26 @@ inputs:
python-path:
description: "Path to Python executable"
required: true

python-version:
description: "Installed Python version"
required: true

tox-version:
description: "Tox version to use"
required: false
default: "3.26.0"
default: "4.1.3"

tox-gh-actions-version:
description: "Tox GitHub Actions plugin version to use"
required: false
default: "2.10.0"
default: "3.0.0"

use-coveralls:
description: "Send coverage to Coveralls"
required: false
default: "false"

coveralls-token:
description: "GitHub token to use, when sending coverage to Coveralls"
required: false
Expand All @@ -36,7 +41,7 @@ runs:
shell: "bash"

- name: "Cache tox"
uses: "actions/cache@v3.0.11"
uses: "actions/cache@v3.2.2"
with:
path: "./.tox/"
key: "tox-${{ inputs.python-version }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_package.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v3.1.0"
- uses: "actions/checkout@v3.2.0"

- id: "python_and_poetry"
uses: "./.github/actions/install_python_and_poetry"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_release.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v3.1.0"
- uses: "actions/checkout@v3.2.0"

- name: "Fetch git data"
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_verify_docs_build.yml
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v3.1.0"
- uses: "actions/checkout@v3.2.0"

- id: "python_and_poetry"
uses: "./.github/actions/install_python_and_poetry"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release_pr.yml
Expand Up @@ -17,12 +17,13 @@ env:

jobs:
create_release_pr:
if: "${{ github.actor == 'playpauseandstop' }}"
name: "Create Release PR"

runs-on: "ubuntu-latest"

steps:
- uses: "actions/checkout@v3.1.0"
- uses: "actions/checkout@v3.2.0"
with:
ref: "main"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_tag.yml
Expand Up @@ -25,7 +25,7 @@ jobs:
app_id: "${{ secrets.BADABUMP_APP_ID }}"
private_key: "${{ secrets.BADABUMP_APP_PRIVATE_KEY }}"

- uses: "actions/checkout@v3.1.0"
- uses: "actions/checkout@v3.2.0"
with:
ref: "main"
token: "${{ steps.token.outputs.token }}"
Expand Down
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Expand Up @@ -4,7 +4,7 @@ exclude: ^(archive|assets|migrations)/.*|.*/(migrations|test-data|vendor)/.*|.*\
minimum_pre_commit_version: "1.17.0"
repos:
- repo: "https://github.com/commitizen-tools/commitizen"
rev: "v2.38.0"
rev: "v2.39.1"
hooks:
- id: "commitizen"
# By default commitizen using `python3` instead `python` language, so
Expand All @@ -19,7 +19,7 @@ repos:
name: "Format code (no-optional)"

- repo: "https://github.com/PyCQA/isort"
rev: "v5.11.3"
rev: "5.11.4"
hooks:
- id: "isort"
name: "Format code (isort)"
Expand Down Expand Up @@ -60,24 +60,22 @@ repos:
- id: "rst-inline-touching-normal"

- repo: "https://github.com/PyCQA/flake8"
rev: "5.0.4"
rev: "6.0.0"
hooks:
- id: "flake8"
name: "Lint code (flake8)"
additional_dependencies: &flake8_additional_dependencies
- "flake8-broken-line==0.6.0"
- "flake8-bugbear==22.12.6"
- "flake8-builtins==2.0.1"
- "flake8-builtins==2.1.0"
- "flake8-comprehensions==3.10.1"
- "flake8-eradicate==1.4.0"
- "flake8-isort==5.0.3"
- "flake8-isort==6.0.0"
- "flake8-mutable==1.2.0"
- "flake8-pie==0.16.0"
- "flake8-quotes==3.3.2"
- "flake8-string-format==0.3.0"
- "flake8-tidy-imports==4.8.0"
- "flake8-variables-names==0.0.5"
- "flake8==5.0.4"
- "flake8==6.0.0"
- "pep8-naming==0.13.3"
exclude: ^docs/.*$

Expand Down
26 changes: 14 additions & 12 deletions Makefile
@@ -1,17 +1,6 @@
.PHONY: \
clean \
distclean \
docs \
install \
lint \
lint-and-test \
list-outdated \
test \
test-only

# Project constants
PROJECT = aiohttp_middlewares
DOCS_DIR = ./docs
DOCS_DIR = docs

# Project vars
POETRY ?= poetry
Expand All @@ -28,22 +17,35 @@ include python.mk

all: install

.PHONY: clean
clean: clean-python

.PHONY: distclean
distclean: clean distclean-python

.PHONY: docs
docs: install
$(PYTHON) -m sphinx_autobuild --host $(DOCS_HOST) --port $(DOCS_PORT) -b html $(DOCS_DIR)/ $(DOCS_DIR)/_build/

.PHONY: install
install: install-python

.PHONY: lint
lint: lint-python

.PHONY: lint-and-test
lint-and-test: lint test

.PHONY: list-outdated
list-outdated: list-outdated-python

.PHONY: test
test: install clean test-only

.PHONY: test-only
test-only:
TOXENV=$(TOXENV) $(TOX) $(TOX_ARGS)

.PHONY: test-%
test-%: install clean
TOXENV=$(subst test-,,$@) $(TOX) $(TOX_ARGS)

0 comments on commit e4d52d5

Please sign in to comment.