Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 49b18a8

Browse files
committedDec 12, 2022
Update CI to use pre-commit
1 parent 951c1e4 commit 49b18a8

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed
 

‎.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
strategy:
2828
fail-fast: false
2929
matrix:
30-
toxenv: [ check-style, check-security, check-dependencies, check-build ]
30+
toxenv: [ check-style, check-dependencies, check-build ]
3131
python-version: [ '3.11' ]
3232
os: [ ubuntu-latest ]
3333
steps:

‎tox.ini

+5-12
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
envlist =
3-
check-{style,security,dependencies,build}
3+
check-{style,dependencies,build}
44
test{,-oldestdeps,-devdeps,-sdpdeps}{,-pyargs,-warnings,-regtests,-cov}
55
build-docs
66
isolated_build = true
@@ -15,20 +15,13 @@ isolated_build = true
1515
#
1616

1717
[testenv:check-style]
18-
description = check code style, e.g. with flake8
1918
skip_install = true
19+
description = Run all style and file checks with pre-commit
2020
deps =
21-
ruff
21+
pre-commit
2222
commands =
23-
ruff . {posargs}
24-
25-
[testenv:check-security]
26-
description = run bandit to check security compliance
27-
skip_install = true
28-
deps =
29-
bandit>=1.7
30-
commands =
31-
bandit -r -ll -x jwst/*test*,jwst/**/*test*,jwst/fits_generator jwst scripts
23+
pre-commit install-hooks
24+
pre-commit run {posargs:--color always --all-files --show-diff-on-failure}
3225

3326
[testenv:check-dependencies]
3427
description = verify that install_requires in setup.cfg has correct dependencies

0 commit comments

Comments
 (0)
Please sign in to comment.