Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Monthly maintenance (Jan 2023) #144

Merged
merged 3 commits into from
Jan 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/install_badabump/action.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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)
Loading