Skip to content

Commit 6e59c12

Browse files
author
Liora Milbaum
committed
refactor: pre-commit trigger from tox
1 parent eb54adf commit 6e59c12

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/pre_commit.yml

+4-6
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ jobs:
3333
- uses: actions/setup-python@v4.3.0
3434
with:
3535
python-version: "3.10"
36-
- name: Install pre-commit
37-
run: pip install -r requirements-precommit.txt
38-
- name: Run pre-commit install
39-
run: pre-commit install
40-
- name: pre-commit run all-files
41-
run: pre-commit run --all-files
36+
- name: install tox
37+
run: pip install tox==3.26.0
38+
- name: pre-commit
39+
run: tox -e pre-commit

tox.ini

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
minversion = 1.6
33
skipsdist = True
44
skip_missing_interpreters = True
5-
envlist = py310,py39,py38,py37,flake8,black,twine-check,mypy,isort,cz,pylint
5+
envlist = py310,py39,py38,py37,flake8,black,twine-check,mypy,isort,cz,pylint,pre-commit
66

77
[testenv]
88
passenv =
@@ -123,3 +123,8 @@ commands =
123123
[testenv:smoke]
124124
deps = -r{toxinidir}/requirements-test.txt
125125
commands = pytest tests/smoke {posargs}
126+
127+
[testenv:pre-commit]
128+
skip_install = true
129+
deps = -r requirements-precommit.txt
130+
commands = pre-commit run --all-files --show-diff-on-failure

0 commit comments

Comments
 (0)