Skip to content

Commit

Permalink
test fix 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ansibleguy committed Jan 17, 2024
1 parent 60d44bd commit db436ca
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ jobs:
pip install -r requirements.txt
shell: bash

- name: Testing DB migrations for errors
run: |
python3 manage.py makemigrations
python3 manage.py migrate
shell: bash
working-directory: ansible-webui/

- name: Testing DB migrations for warnings
- name: Testing DB migrations for errors & warnings
run: |
m1=$(python3 manage.py makemigrations 2>&1)
if echo "$m1" | grep -q 'WARNING'; then exit 1;fi
Expand All @@ -72,17 +65,21 @@ jobs:

- name: Testing to build Ansible-WebUI with PIP
run: |
set +e
path_repo="$(pwd)"
cd /tmp
echo 'CREATING TMP VENV'
tmp_venv="/tmp/ansible-webui-venv/$(date +%s)"
python3 -m virtualenv "$tmp_venv" >/dev/null
source "${tmp_venv}/bin/activate"
python3 -m pip install -e "$path_repo" >/dev/null
echo 'INSTALLING MODULE'
python3 -m pip install -e "$GITHUB_WORKSPACE" >/dev/null
set +e
echo 'RUNNING APP'
timeout 2 python3 -m ansible-webui
ec="$?"
echo 'CLEANUP'
deactivate
rm -rf "$tmp_venv"
Expand Down

0 comments on commit db436ca

Please sign in to comment.