66 pull_request :
77 branches : ' *'
88
9+ env :
10+ PY_COLORS : 1
11+ # MU_LOG_TO_STDOUT: 1
12+
913jobs :
1014 test :
1115 timeout-minutes : 30
@@ -90,11 +94,12 @@ jobs:
9094 "
9195
9296 test-pios :
93- name : Test Raspbian ${{ matrix.docker-tag }}
97+ name : Test PiOS ${{ matrix.docker-tag }} (${{ matrix.pyenv }})
9498 runs-on : ubuntu-latest
9599 strategy :
96100 matrix :
97101 docker-tag : ['stretch-2018-03-13', 'buster-2021-05-28', 'buster-legacy-2021-12-02']
102+ pyenv : ['virtualenv', 'system']
98103 fail-fast : false
99104 services :
100105 rpios :
@@ -129,21 +134,38 @@ jobs:
129134 port : ${{ job.services.rpios.ports[5022] }}
130135 # Purposely skip apt update, install version from image stale index
131136 script : sudo apt-get install -y python3-virtualenv
132- - name : Create venv and install Python dependencies
137+ - name : Create virtual environment and always activate it
138+ if : matrix.pyenv == 'virtualenv'
133139 uses : appleboy/ssh-action@master
134140 with :
135141 host : rpios
136142 username : pi
137143 password : raspberry
138144 port : ${{ job.services.rpios.ports[5022] }}
139- command_timeout : 20m
140145 script : |
141146 python3 -m virtualenv ~/mu/.venv -v --python=python3 --system-site-packages
142147 echo "source ~/mu/.venv/bin/activate" > ~/.bashrc_new && cat ~/.bashrc >> ~/.bashrc_new
143148 rm ~/.bashrc && mv ~/.bashrc_new ~/.bashrc
144- source .venv/bin/activate
145- python -m pip list
146- python -m pip install ."[dev]"
149+ - name : Upgrade pip in Stretch system test
150+ if : matrix.pyenv == 'system' && matrix.docker-tag == 'stretch-2018-03-13'
151+ uses : appleboy/ssh-action@master
152+ with :
153+ host : rpios
154+ username : pi
155+ password : raspberry
156+ port : ${{ job.services.rpios.ports[5022] }}
157+ script : python3 -m pip install pip==20.3.4
158+ - name : Install Python dependencies
159+ uses : appleboy/ssh-action@master
160+ with :
161+ host : rpios
162+ username : pi
163+ password : raspberry
164+ port : ${{ job.services.rpios.ports[5022] }}
165+ command_timeout : 20m
166+ script : |
167+ python3 -m pip list
168+ python3 -m pip install ."[dev]"
147169 - name : Environment info
148170 uses : appleboy/ssh-action@master
149171 with :
@@ -165,4 +187,4 @@ jobs:
165187 password : raspberry
166188 port : ${{ job.services.rpios.ports[5022] }}
167189 command_timeout : 25m
168- script : xvfb-run python make.py check
190+ script : xvfb-run python3 make.py check
0 commit comments