From 94eac079ffb72dbaf0508d328ca5855753358d5c Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Tue, 20 Aug 2024 09:18:27 +0200 Subject: [PATCH] Run meta/config. --- .github/workflows/pre-commit.yml | 14 ++++++++++++-- .meta.toml | 2 +- .pre-commit-config.yaml | 2 ++ MANIFEST.in | 1 + tox.ini | 18 +++++++++--------- 5 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 5c015fd6e7..eb4f0c64b5 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,5 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/zope-product name: pre-commit on: @@ -5,9 +7,15 @@ on: push: branches: - master + # Allow to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + FORCE_COLOR: 1 + jobs: pre-commit: - name: pre-commit linting + name: linting runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -16,7 +24,9 @@ jobs: python-version: 3.x - uses: pre-commit/action@v3.0.1 with: - extra_args: --all-files + extra_args: --all-files --show-diff-on-failure + env: + PRE_COMMIT_COLOR: always - uses: pre-commit-ci/lite-action@v1.0.2 if: always() with: diff --git a/.meta.toml b/.meta.toml index 55664e368a..733abde717 100644 --- a/.meta.toml +++ b/.meta.toml @@ -2,7 +2,7 @@ # https://github.com/zopefoundation/meta/tree/master/config/zope-product [meta] template = "zope-product" -commit-id = "994c74d7" +commit-id = "da0ad14b" [python] with-pypy = false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index de2984176b..8d996f7755 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,5 @@ +# Generated from: +# https://github.com/zopefoundation/meta/tree/master/config/zope-product minimum_pre_commit_version: '3.6' repos: - repo: https://github.com/pycqa/isort diff --git a/MANIFEST.in b/MANIFEST.in index 3a3a7e9b98..ca8ef935c3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,6 +5,7 @@ include *.rst include *.txt include buildout.cfg include tox.ini +include .pre-commit-config.yaml recursive-include docs *.py recursive-include docs *.rst diff --git a/tox.ini b/tox.ini index 407416a77a..0edbc014fc 100644 --- a/tox.ini +++ b/tox.ini @@ -50,15 +50,6 @@ commands = !universal2: {envdir}/bin/alltests --layer '!Products.PluginIndexes' {posargs:-vc} allowlist_externals = * -[testenv:lint] -basepython = python3 -description = This env runs all linters configured in .pre-commit-config.yaml -skip_install = true -deps = - pre-commit -commands_pre = -commands = - pre-commit run --all-files --show-diff-on-failure [testenv:release-check] description = ensure that the distribution is ready to release @@ -77,6 +68,15 @@ commands = python -m build --sdist --no-isolation twine check dist/* +[testenv:lint] +description = This env runs all linters configured in .pre-commit-config.yaml +basepython = python3 +skip_install = true +deps = + pre-commit +commands_pre = +commands = + pre-commit run --all-files --show-diff-on-failure [testenv:docs] basepython = python3