diff --git a/alfred/ci.py b/alfred/ci.py index 2789fbed5..753239baf 100644 --- a/alfred/ci.py +++ b/alfred/ci.py @@ -4,12 +4,15 @@ @alfred.command("ci", help="continuous integration pipeline") -def ci(): - alfred.invoke_command("ci.mypy") - alfred.invoke_command("ci.pytest") - alfred.invoke_command("npm.lint") - alfred.invoke_command("npm.build") - +@alfred.option('--front', help="run for frontend only", is_flag=True, default=False) +@alfred.option('--back', help="run for backend only", is_flag=True, default=False) +def ci(front, back): + if back or (not front and not back): + alfred.invoke_command("ci.mypy") + alfred.invoke_command("ci.pytest") + if front or (not front and not back): + alfred.invoke_command("npm.lint") + alfred.invoke_command("npm.build") @alfred.command("ci.mypy", help="typing checking with mypy on ./src/streamsync") def ci_mypy():