mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-14 16:01:29 +00:00
Fix automated tests. Now a python venv is required.
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user