Skip to content

Commit

Permalink
feat: allow a list of smoke tests for the "test" tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jdum committed Jan 16, 2024
1 parent 343e4db commit 0cf2f9e
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion nua-agent/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nua-agent"
version = "0.5.45"
version = "0.5.46"
description = "Nua agent"
authors = [
"Stefane Fermigier <[email protected]>",
Expand Down
17 changes: 11 additions & 6 deletions nua-agent/src/nua/agent/scripts/app_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,19 @@ def merge_files(self):
copy2(file, target.parent)

def test_build(self):
"""Execute a configured shell command to check build is successful."""
"""Execute a configured shell command or list of commands to check
that the build is successful."""
default = "test -f /nua/metadata/nua-config.*"
command = self.config.build.get("test", default)
if not command:
commands = self.config.build.get("test", default)
if not commands:
return

show("Execution of build test command:", command)
sh(command, show_cmd=False)
if isinstance(commands, str):
commands = [commands]
for command in commands:
if not command.strip():
continue
show("Execution of build test command:", command)
sh(command, show_cmd=False)


def main() -> None:
Expand Down
2 changes: 1 addition & 1 deletion nua-build/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nua-build"
version = "0.5.45"
version = "0.5.46"
description = "Nua build package (currently: build, core build, agent)"
authors = [
"Stefane Fermigier <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion nua-cli/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nua-cli"
version = "0.5.45"
version = "0.5.46"
description = "Command line interface for the Nua self-hosted PaaS (Platform as a Service)"
authors = ["Stefane Fermigier <[email protected]>"]

Expand Down
2 changes: 1 addition & 1 deletion nua-lib/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nua-lib"
version = "0.5.45"
version = "0.5.46"
description = "Nua common library"
authors = ["Stefane Fermigier <[email protected]>", "Jerome Dumonteil <[email protected]>"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion nua-orchestrator/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nua-orchestrator"
version = "0.5.45"
version = "0.5.46"
description = "Nua orchestrator - local implementation"
authors = [
"Stefane Fermigier <[email protected]>",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nua-monorepo"
version = "0.5.45"
version = "0.5.46"
description = "An open source, self-hosted cloud platform project"
authors = [
"Stefane Fermigier <[email protected]>",
Expand Down

0 comments on commit 0cf2f9e

Please sign in to comment.