From 664f41c5acda3c9d4bf934edb18606cbbd348573 Mon Sep 17 00:00:00 2001 From: Matthias Hagmann <16444067+MattHag@users.noreply.github.com> Date: Mon, 12 Feb 2024 23:22:26 +0100 Subject: [PATCH] Setup macOS tests using GitHub action Related #1244 --- .github/workflows/tests.yml | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 27cf3ff058..f38478410e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -28,6 +28,37 @@ jobs: python -m pip install --upgrade pip pip install -e .[test] - - name: Run tests + - name: Run tests on Ubuntu + run: | + pytest + + macos-build: + runs-on: macos-latest + + strategy: + matrix: + python-version: [3.7, 3.12] + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4.3.0 + with: + python-version: ${{ matrix.python-version }} + + - name: Set up macOS dependencies + run: | + brew install hidapi dbus gtk+3 pygobject3 + + brew services start dbus + + - name: Install Python dependencies + run: | + python -m pip install --upgrade pip + pip install ."[test]" + + - name: Run tests on macOS run: | pytest