Fix automated tests. Now a python venv is required.

This commit is contained in:
Albrecht Lohofener
2024-12-02 12:02:55 +01:00
parent f5b4fa420f
commit 04edc20d06
3 changed files with 12 additions and 12 deletions
@@ -263,12 +263,12 @@ jobs:
multipass exec router-vm -- docker stop portainer
# Install python
multipass exec router-vm -- sudo apt-get -y install python3-pip python-is-python3
multipass exec router-vm -- sudo apt-get -y install python3-pip python-is-python3 python3-venv
# Install everthing for pytest
multipass exec router-vm -- find .
#multipass exec router-vm -- export PATH=$PATH:~/.local/bin # not working
multipass exec router-vm -- pip install -r test/requirements.txt
multipass exec router-vm -- bash -c 'python -m venv ~/.venv'
multipass exec router-vm -- bash -c 'source ~/.venv/bin/activate && pip install -r test/requirements.txt'
echo '******** router-vm IPs ********'
multipass exec router-vm -- ip addr
@@ -311,7 +311,7 @@ jobs:
run: |
cat test/tests/docker-compose.yml.template
# Run pytest
multipass exec router-vm -- sh -c 'cd test/ && ~/.local/bin/pytest -v -s --html=report.html --self-contained-html'
multipass exec router-vm -- bash -c 'source ~/.venv/bin/activate && cd test/ && pytest -v -s --html=report.html --self-contained-html'
- name: Archive test report
if: always()
+4 -4
View File
@@ -265,12 +265,12 @@ jobs:
multipass exec router-vm -- docker stop portainer
# Install python
multipass exec router-vm -- sudo apt-get -y install python3-pip python-is-python3
multipass exec router-vm -- sudo apt-get -y install python3-pip python-is-python3 python3-venv
# Install everthing for pytest
multipass exec router-vm -- find .
#multipass exec router-vm -- export PATH=$PATH:~/.local/bin # not working
multipass exec router-vm -- pip install -r test/requirements.txt
multipass exec router-vm -- bash -c 'python -m venv ~/.venv'
multipass exec router-vm -- bash -c 'source ~/.venv/bin/activate && pip install -r test/requirements.txt'
echo '******** router-vm IPs ********'
multipass exec router-vm -- ip addr
@@ -318,7 +318,7 @@ jobs:
run: |
cat test/tests/docker-compose.yml.template
# Run pytest
multipass exec router-vm -- sh -c 'cd test/ && ~/.local/bin/pytest -v -s --html=report.html --self-contained-html'
multipass exec router-vm -- bash -c 'source ~/.venv/bin/activate && cd test/ && pytest -v -s --html=report.html --self-contained-html'
- name: Archive test report
if: always()
+4 -4
View File
@@ -257,12 +257,12 @@ jobs:
multipass exec router-vm -- docker stop portainer
# Install python
multipass exec router-vm -- sudo apt-get -y install python3-pip python-is-python3
multipass exec router-vm -- sudo apt-get -y install python3-pip python-is-python3 python3-venv
# Install everthing for pytest
multipass exec router-vm -- find .
#multipass exec router-vm -- export PATH=$PATH:~/.local/bin # not working
multipass exec router-vm -- pip install -r test/requirements.txt
multipass exec router-vm -- bash -c 'python -m venv ~/.venv'
multipass exec router-vm -- bash -c 'source ~/.venv/bin/activate && pip install -r test/requirements.txt'
echo '******** router-vm IPs ********'
multipass exec router-vm -- ip addr
@@ -303,7 +303,7 @@ jobs:
- name: Run tests
run: |
# Run pytest
multipass exec router-vm -- sh -c 'cd test/ && ~/.local/bin/pytest -v -s --html=report.html --self-contained-html'
multipass exec router-vm -- bash -c 'source ~/.venv/bin/activate && cd test/ && pytest -v -s --html=report.html --self-contained-html'
- name: Archive test report
if: always()