Skip to content

Commit

Permalink
Run tox envs in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
nycholas committed Jun 21, 2024
1 parent c0e3b5d commit 23f5fc3
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/on_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ jobs:
- name: Run tox
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
run: |
tox -e py,py-async,style,typing,security,docs
tox -e py,py-async,style,typing-mypy,security-safety,security-bandit,docs -p all
- name: Run tox (Pytype)
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
run: |
tox -e pytype
tox -e typing-pytype
4 changes: 2 additions & 2 deletions .github/workflows/pre_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ jobs:
- name: Run tox
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
run: |
tox -e py,py-async,style,typing,security,docs
tox -e py,py-async,style,typing-mypy,security-safety,security-bandit,docs -p all
- name: Run tox (Pytype)
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }}
run: |
tox -e pytype
tox -e typing-pytype
test:
name: Test
Expand Down
4 changes: 2 additions & 2 deletions requirements/security.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Security check
# ------------------------------------------------------------------------------
bandit==1.7.9;python_version>="3.11" # https://github.com/PyCQA/bandit
safety==3.2.3;python_version>="3.11" # https://github.com/pyupio/safety
bandit;python_version>="3.11" # https://github.com/PyCQA/bandit
safety;python_version>="3.11" # https://github.com/pyupio/safety
21 changes: 13 additions & 8 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ envlist =
py3{12,11,10,9,8}
py3{12,11,10,9,8}-async
style
typing
pytype
security
typing-{mypy,pytype}
security-{safety,bandit}
docs
skip_missing_interpreters = true

Expand All @@ -27,26 +26,32 @@ skip_install = true
commands =
pre-commit run --all-files --show-diff-on-failure

[testenv:typing]
[testenv:typing-mypy]
basepython=python3.12
deps =
-r requirements/typing.txt
commands =
mypy --install-types --non-interactive src/

[testenv:pytype]
[testenv:typing-pytype]
basepython=python3.11
deps =
-r requirements/typing.txt
commands =
pytype

[testenv:security]
[testenv:security-safety]
basepython=python3.12
deps =
safety
commands =
safety check -r requirements/production.txt

[testenv:security-bandit]
basepython=python3.12
deps =
-r requirements/security.txt
bandit
commands =
safety check
bandit -r src/

[testenv:docs]
Expand Down

0 comments on commit 23f5fc3

Please sign in to comment.