Skip to content

Commit

Permalink
refactor: pre-commit trigger from tox
Browse files Browse the repository at this point in the history
  • Loading branch information
lmilbaum committed Oct 19, 2022
1 parent eb54adf commit 6e59c12
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/pre_commit.yml
Expand Up @@ -33,9 +33,7 @@ jobs:
- uses: actions/setup-python@v4.3.0
with:
python-version: "3.10"
- name: Install pre-commit
run: pip install -r requirements-precommit.txt
- name: Run pre-commit install
run: pre-commit install
- name: pre-commit run all-files
run: pre-commit run --all-files
- name: install tox
run: pip install tox==3.26.0
- name: pre-commit
run: tox -e pre-commit
7 changes: 6 additions & 1 deletion tox.ini
Expand Up @@ -2,7 +2,7 @@
minversion = 1.6
skipsdist = True
skip_missing_interpreters = True
envlist = py310,py39,py38,py37,flake8,black,twine-check,mypy,isort,cz,pylint
envlist = py310,py39,py38,py37,flake8,black,twine-check,mypy,isort,cz,pylint,pre-commit

[testenv]
passenv =
Expand Down Expand Up @@ -123,3 +123,8 @@ commands =
[testenv:smoke]
deps = -r{toxinidir}/requirements-test.txt
commands = pytest tests/smoke {posargs}

[testenv:pre-commit]
skip_install = true
deps = -r requirements-precommit.txt
commands = pre-commit run --all-files --show-diff-on-failure

0 comments on commit 6e59c12

Please sign in to comment.