Skip to content

Commit

Permalink
ensure format and sort checks are run on CI (#5057)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsachs authored Jul 3, 2024
1 parent 9994198 commit 182ffe7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backend_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ jobs:
matrix:
session_name:
[
"isort",
"black",
'"isort(check)"',
'"black(check)"',
"mypy",
"pylint",
"xenon",
Expand Down
8 changes: 4 additions & 4 deletions noxfiles/ci_nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
@nox.session()
def static_checks(session: nox.Session) -> None:
"""Run the static checks only."""
session.notify("black")
session.notify("isort")
session.notify("black(fix)")
session.notify("isort(fix)")
session.notify("xenon")
session.notify("mypy")
session.notify("pylint")
Expand All @@ -35,8 +35,8 @@ def static_checks(session: nox.Session) -> None:
@nox.parametrize(
"mode",
[
nox.param("fix", id="fix"),
nox.param("check", id="check"),
nox.param("fix", id="fix"),
],
)
def black(session: nox.Session, mode: str) -> None:
Expand All @@ -52,8 +52,8 @@ def black(session: nox.Session, mode: str) -> None:
@nox.parametrize(
"mode",
[
nox.param("fix", id="fix"),
nox.param("check", id="check"),
nox.param("fix", id="fix"),
],
)
def isort(session: nox.Session, mode: str) -> None:
Expand Down
3 changes: 2 additions & 1 deletion noxfiles/setup_tests_nox.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import Optional

from nox import Session

from constants_nox import (
CI_ARGS_EXEC,
COMPOSE_FILE,
Expand All @@ -11,7 +13,6 @@
START_APP,
START_APP_WITH_EXTERNAL_POSTGRES,
)
from nox import Session
from run_infrastructure import API_TEST_DIR, OPS_TEST_DIR, run_infrastructure


Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ exclude = '''
###########
[tool.isort]
known_first_party = ["versioneer"]
known_third_party = ["nox"]
profile = "black"
line_length = 88
src_paths = ["src", "tests", "noxfiles"]
Expand Down

0 comments on commit 182ffe7

Please sign in to comment.