Skip to content

Commit

Permalink
Move slow linters back to tox -e lint.
Browse files Browse the repository at this point in the history
Those checkers are not able to work on single files present in a commit but need conecptionally work on the whole repository (check-manifest) and thus are not suited to be run before each commit, but only in the CI.
  • Loading branch information
sallner committed Sep 22, 2023
1 parent bfe6aa9 commit 3743bf1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
- ["macos", "macos-11"]
config:
# [Python version, tox env]
- ["3.9", "lint"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
Expand All @@ -31,8 +32,10 @@ jobs:
- ["3.9", "docs"]
- ["3.9", "coverage"]
exclude:
- { os: ["windows", "windows-latest"], config: ["3.9", "lint"] }
- { os: ["windows", "windows-latest"], config: ["3.9", "docs"] }
- { os: ["windows", "windows-latest"], config: ["3.9", "coverage"] }
- { os: ["macos", "macos-11"], config: ["3.9", "lint"] }
- { os: ["macos", "macos-11"], config: ["3.9", "docs"] }
- { os: ["macos", "macos-11"], config: ["3.9", "coverage"] }
# macOS/Python 3.11+ is set up for universal2 architecture
Expand Down
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,3 @@ repos:
hooks:
- id: teyit
exclude: src/App/tests/fixtures/error.py # invalid syntax
- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
- id: check-manifest
- repo: https://github.com/mgedmin/check-python-versions
rev: "0.21.3"
hooks:
- id: check-python-versions
11 changes: 11 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[tox]
minversion = 3.18
envlist =
lint
py37
py38
py39
Expand Down Expand Up @@ -30,6 +31,16 @@ commands =
{envdir}/bin/alltests --layer '!Products.PluginIndexes' {posargs:-vc}
allowlist_externals = *

[testenv:lint]
basepython = python3
commands_pre =
commands =
check-manifest
check-python-versions
deps =
check-manifest
check-python-versions

[testenv:pre-commit]
basepython = python3
description = This env runs all linters configured in .pre-commit-config.yaml
Expand Down

0 comments on commit 3743bf1

Please sign in to comment.