Skip to content

Commit

Permalink
CI: Add Arm Raspbian job that installs Mu in system Python.
Browse files Browse the repository at this point in the history
In addition to the jobs installing it in a virtual environment.
  • Loading branch information
carlosperate committed Feb 28, 2022
1 parent e16ff95 commit 59b5cc7
Showing 1 changed file with 29 additions and 7 deletions.
36 changes: 29 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
pull_request:
branches: '*'

env:
PY_COLORS: 1
#MU_LOG_TO_STDOUT: 1

jobs:
test:
timeout-minutes: 30
Expand Down Expand Up @@ -90,11 +94,12 @@ jobs:
"
test-pios:
name: Test Raspbian ${{ matrix.docker-tag }}
name: Test PiOS ${{ matrix.docker-tag }} (${{ matrix.pyenv }})
runs-on: ubuntu-latest
strategy:
matrix:
docker-tag: ['stretch-2018-03-13', 'buster-2021-05-28', 'buster-legacy-2021-12-02']
pyenv: ['virtualenv', 'system']
fail-fast: false
services:
rpios:
Expand Down Expand Up @@ -129,21 +134,38 @@ jobs:
port: ${{ job.services.rpios.ports[5022] }}
# Purposely skip apt update, install version from image stale index
script: sudo apt-get install -y python3-virtualenv
- name: Create venv and install Python dependencies
- name: Create virtual environment and always activate it
if: matrix.pyenv == 'virtualenv'
uses: appleboy/ssh-action@master
with:
host: rpios
username: pi
password: raspberry
port: ${{ job.services.rpios.ports[5022] }}
command_timeout: 20m
script: |
python3 -m virtualenv ~/mu/.venv -v --python=python3 --system-site-packages
echo "source ~/mu/.venv/bin/activate" > ~/.bashrc_new && cat ~/.bashrc >> ~/.bashrc_new
rm ~/.bashrc && mv ~/.bashrc_new ~/.bashrc
source .venv/bin/activate
python -m pip list
python -m pip install ."[dev]"
- name: Upgrade pip in Stretch system test
if: matrix.pyenv == 'system' && matrix.docker-tag == 'stretch-2018-03-13'
uses: appleboy/ssh-action@master
with:
host: rpios
username: pi
password: raspberry
port: ${{ job.services.rpios.ports[5022] }}
script: python3 -m pip install pip==20.3.4
- name: Install Python dependencies
uses: appleboy/ssh-action@master
with:
host: rpios
username: pi
password: raspberry
port: ${{ job.services.rpios.ports[5022] }}
command_timeout: 20m
script: |
python3 -m pip list
python3 -m pip install ."[dev]"
- name: Environment info
uses: appleboy/ssh-action@master
with:
Expand All @@ -165,4 +187,4 @@ jobs:
password: raspberry
port: ${{ job.services.rpios.ports[5022] }}
command_timeout: 25m
script: xvfb-run python make.py check
script: xvfb-run python3 make.py check

0 comments on commit 59b5cc7

Please sign in to comment.