-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(RHTAPWATCH-643): Adding python tests to CI
Signed-off-by: Yftach Herzog <[email protected]>
- Loading branch information
1 parent
05a63e2
commit 8831254
Showing
8 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash -ex | ||
|
||
main() { | ||
local pkgs=("tests" "compose_generator") | ||
pipenv run isort --profile black "${pkgs[@]}" | ||
pipenv run black "${pkgs[@]}" | ||
} | ||
|
||
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then | ||
main "$@" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""Static checks""" | ||
from subprocess import run | ||
from typing import Final | ||
|
||
PKGS: Final[list[str]] = ["tests", "compose_generator"] | ||
|
||
|
||
def test_mypy() -> None: | ||
"""Static Type check""" | ||
run(["mypy"] + PKGS, check=True) | ||
|
||
|
||
def test_isort() -> None: | ||
"""Imports formatting check""" | ||
run(["isort", "--check", "--profile", "black"] + PKGS, check=True) | ||
|
||
|
||
def test_black() -> None: | ||
"""Formatting check""" | ||
run(["black", "--check"] + PKGS, check=True) | ||
|
||
|
||
def test_pylint() -> None: | ||
"""Lint check""" | ||
run(["pylint"] + PKGS, check=True) |