diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 37c7dbc..6c00b2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -43,8 +43,12 @@ jobs: run: | m1=$(python3 manage.py makemigrations 2>&1) if echo "$m1" | grep -q 'WARNING'; then exit 1;fi + m2=$(python3 manage.py migrate 2>&1) if echo "$m2" | grep -q 'WARNING'; then exit 1;fi + + m3=$(python3 manage.py migrate aw 2>&1) + if echo "$m3" | grep -q 'WARNING'; then exit 1;fi shell: bash working-directory: src/ansible-webui/ diff --git a/scripts/run_shared.sh b/scripts/run_shared.sh index b6b744d..3cbf7d6 100644 --- a/scripts/run_shared.sh +++ b/scripts/run_shared.sh @@ -35,7 +35,7 @@ export DJANGO_SUPERUSER_EMAIL='ansible@localhost' if [[ "$TEST_QUIET" != "1" ]] then log 'INSTALLING REQUIREMENTS' - python3 -m pip install --upgrade -r ../requirements.txt >/dev/null + python3 -m pip install --upgrade -r ./requirements.txt >/dev/null fi log 'SETTING VERSION' diff --git a/src/ansible-webui/aw/model/job.py b/src/ansible-webui/aw/model/job.py index 4843c59..78b99bb 100644 --- a/src/ansible-webui/aw/model/job.py +++ b/src/ansible-webui/aw/model/job.py @@ -105,10 +105,10 @@ class JobExecutionResultHost(BareModel): result = models.ForeignKey(JobExecutionResult, on_delete=models.CASCADE, related_name='jobresulthost_fk_result') def __str__(self) -> str: + result = 'succeeded' + if int(self.tasks_failed) > 0: result = 'failed' - else: - result = 'success' if self.warning is None else 'warning' return f"Job execution {self.created} of host {self.hostname}: {result}"