@@ -90,11 +90,12 @@ jobs:
9090 "
9191
9292 test-pios :
93- name : Test Raspbian ${{ matrix.docker-tag }}
93+ name : Test PiOS ${{ matrix.docker-tag }} (${{ matrix.pyenv }})
9494 runs-on : ubuntu-latest
9595 strategy :
9696 matrix :
9797 docker-tag : ['stretch-2018-03-13', 'buster-2021-03-25']
98+ pyenv : ['virtualenv', 'system']
9899 fail-fast : false
99100 services :
100101 rpios :
@@ -129,21 +130,38 @@ jobs:
129130 port : ${{ job.services.rpios.ports[5022] }}
130131 # Purposely skip apt update, install version from image stale index
131132 script : sudo apt-get install -y python3-virtualenv
132- - name : Create venv and install Python dependencies
133+ - name : Create virtual environment and always activate it
134+ if : matrix.pyenv == 'virtualenv'
133135 uses : appleboy/ssh-action@master
134136 with :
135137 host : rpios
136138 username : pi
137139 password : raspberry
138140 port : ${{ job.services.rpios.ports[5022] }}
139- command_timeout : 20m
140141 script : |
141142 python3 -m virtualenv ~/mu/.venv -v --python=python3 --system-site-packages
142143 echo "source ~/mu/.venv/bin/activate" > ~/.bashrc_new && cat ~/.bashrc >> ~/.bashrc_new
143144 rm ~/.bashrc && mv ~/.bashrc_new ~/.bashrc
144- source .venv/bin/activate
145- python -m pip list
146- python -m pip install ."[dev]"
145+ - name : Upgrade pip in Stretch system test
146+ if : matrix.pyenv == 'system' && matrix.docker-tag == 'stretch-2018-03-13'
147+ uses : appleboy/ssh-action@master
148+ with :
149+ host : rpios
150+ username : pi
151+ password : raspberry
152+ port : ${{ job.services.rpios.ports[5022] }}
153+ script : python3 -m pip install pip==20.3.4
154+ - name : Install Python dependencies
155+ uses : appleboy/ssh-action@master
156+ with :
157+ host : rpios
158+ username : pi
159+ password : raspberry
160+ port : ${{ job.services.rpios.ports[5022] }}
161+ command_timeout : 20m
162+ script : |
163+ python3 -m pip list
164+ python3 -m pip install ."[dev]"
147165 - name : Environment info
148166 uses : appleboy/ssh-action@master
149167 with :
@@ -165,4 +183,4 @@ jobs:
165183 password : raspberry
166184 port : ${{ job.services.rpios.ports[5022] }}
167185 command_timeout : 25m
168- script : xvfb-run python make.py check
186+ script : xvfb-run python3 make.py check
0 commit comments