fix Coverage step - missing pytest-cov
@@ -67,23 +67,27 @@ jobs:
run: |
sudo apt-get -y install sshpass
python -m pip install --upgrade pip setuptools wheel
- pip install -U pycodestyle coveralls pytest pytest-mccabe pytest-random mock pytest-asyncio
+ pip install -U pycodestyle coveralls pytest pytest-cov pytest-mccabe pytest-random mock pytest-asyncio
pip install -Ur requirements.txt
- - name: Script before test
+ - name: Create local users required by integration tests
run: |
- python -V
cat /etc/passwd | grep home
sudo useradd molerssh -c MolerSshTest -s /bin/bash -l -m -p `python3 -c 'import crypt; print(crypt.crypt("moler_password", "mr"))'`
sudo useradd sshproxy -c Proxy4SshTest -s /bin/bash -l -m -p `python3 -c 'import crypt; print(crypt.crypt("proxy_password", "mr"))'`
sudo useradd adbshell -c AdbShell4SshTest -s /bin/bash -l -m -p `python3 -c 'import crypt; print(crypt.crypt("adb_password", "mr"))'`
cat /etc/passwd | grep home
- which scp
+ echo ---- try logging as integration tests users via ssh
sshpass -p moler_password ssh -oStrictHostKeyChecking=no molerssh@localhost pwd
sshpass -p proxy_password ssh -oStrictHostKeyChecking=no sshproxy@localhost pwd
sshpass -p adb_password ssh -oStrictHostKeyChecking=no adbshell@localhost pwd
- sshpass -p moler_password scp adb_simulation.sh molerssh@localhost:/home/molerssh/adb_simulation.sh
- sshpass -p moler_password ssh molerssh@localhost 'chmod +x ~/adb_simulation.sh'
- sshpass -p moler_password ssh molerssh@localhost 'echo "alias adb=~/adb_simulation.sh" >> ~/.profile'
+ - name: Upload adb simulator
+ run: |
+ sudo cp adb_simulation.sh /usr/bin/adb
+ sudo chmod +x /usr/bin/adb
+ sudo ls -l /usr/bin/adb
+ which adb
+ echo ----------- test adb simulator
+ adb devices
- name: Coverage
run: |
python -m pytest -v --random --cov=moler --cov-report=xml --cov-report=html --cov-report=term --mccabe
