From 47d6aaf9a6d0286c6bddb432125e32464c1729c4 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Thu, 27 Jun 2024 11:02:35 +0100 Subject: [PATCH] CI: Test install. --- .github/workflows/build.yml | 2 ++ .github/workflows/install.yml | 40 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 2 ++ 3 files changed, 44 insertions(+) create mode 100644 .github/workflows/install.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 07620e3..976fee2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,8 @@ jobs: test: name: Python ${{ matrix.python }} runs-on: ubuntu-latest + env: + TERM: xterm-256color strategy: matrix: python: ['3.9', '3.10', '3.11'] diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml new file mode 100644 index 0000000..596dd75 --- /dev/null +++ b/.github/workflows/install.yml @@ -0,0 +1,40 @@ +name: Install Test + +on: + pull_request: + push: + branches: + - main + +jobs: + test: + name: Python ${{ matrix.python }} + runs-on: ubuntu-latest + env: + TERM: xterm-256color + strategy: + matrix: + python: ['3.9', '3.10', '3.11'] + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Stub files & Patch install.sh + run: | + mkdir -p boot/firmware + touch boot/firmware/config.txt + sed -i "s|/boot/firmware|`pwd`/boot/firmware|g" install.sh + sed -i "s|sudo raspi-config|raspi-config|g" pyproject.toml + touch raspi-config + chmod +x raspi-config + echo `pwd` >> $GITHUB_PATH + + - name: Run Tests + run: | + ./install.sh --unstable --force diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f8cff7..170a4a7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,8 @@ jobs: test: name: Python ${{ matrix.python }} runs-on: ubuntu-latest + env: + TERM: xterm-256color strategy: matrix: python: ['3.9', '3.10', '3.11']