From 4a648e2596fd7caf5ab3e323d32c34160f137cf2 Mon Sep 17 00:00:00 2001
From: Tobias Raabe <raabe@posteo.de>
Date: Sun, 4 Feb 2024 14:03:51 +0100
Subject: [PATCH 1/4] Use MacOS runner with M1.

---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index bc558ecf..becee86a 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -26,7 +26,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
+        os: ['ubuntu-latest', 'macos-14', 'windows-latest']
         python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
 
     steps:

From 91d35873e7cb820749d609d5f868a349f2207759 Mon Sep 17 00:00:00 2001
From: Tobias Raabe <raabe@posteo.de>
Date: Sun, 4 Feb 2024 14:05:40 +0100
Subject: [PATCH 2/4]  Fix.!

---
 .github/workflows/main.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index becee86a..7f1fe584 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -43,7 +43,7 @@ jobs:
           sudo apt-get update
           sudo apt-get install graphviz graphviz-dev
 
-      - if: matrix.os == 'macos-latest'
+      - if: matrix.os == 'macos-14'
         run: brew install graphviz
 
       # Unit, integration, and end-to-end tests.

From 68b5c47b255077d2974109d13a12a3aed9b8d947 Mon Sep 17 00:00:00 2001
From: Tobias Raabe <raabe@posteo.de>
Date: Sun, 4 Feb 2024 14:27:34 +0100
Subject: [PATCH 3/4] No graphviz on Macos.

---
 .github/workflows/main.yml | 3 ---
 tox.ini                    | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 7f1fe584..ba2b1d03 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -43,9 +43,6 @@ jobs:
           sudo apt-get update
           sudo apt-get install graphviz graphviz-dev
 
-      - if: matrix.os == 'macos-14'
-        run: brew install graphviz
-
       # Unit, integration, and end-to-end tests.
 
       - name: Run unit tests and doctests.
diff --git a/tox.ini b/tox.ini
index fb088034..bfc51512 100644
--- a/tox.ini
+++ b/tox.ini
@@ -9,7 +9,7 @@ package = editable
 [testenv:test]
 extras = all, test
 deps =
-    pygraphviz;platform_system != "Windows"
+    pygraphviz;platform_system == "Linux"
 commands =
     pytest --nbmake {posargs}
 

From 043ae6759694cae29e63abe9ebfd0d8f51c5827d Mon Sep 17 00:00:00 2001
From: Tobias Raabe <raabe@posteo.de>
Date: Sun, 4 Feb 2024 14:33:26 +0100
Subject: [PATCH 4/4] fix.

---
 tests/test_dag_command.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/test_dag_command.py b/tests/test_dag_command.py
index cf0113b7..6edd0148 100644
--- a/tests/test_dag_command.py
+++ b/tests/test_dag_command.py
@@ -16,10 +16,10 @@
 else:
     _IS_PYGRAPHVIZ_INSTALLED = True
 
-# Test should run always on remote except on Windows and locally only with the package
-# installed.
+# Test should run always on remote except on Windows and MacOS with M1 and locally only
+# with the package installed.
 _TEST_SHOULD_RUN = _IS_PYGRAPHVIZ_INSTALLED or (
-    os.environ.get("CI") and sys.platform != "win32"
+    os.environ.get("CI") and sys.platform not in ("win32", "darwin")
 )
 _GRAPH_LAYOUTS = ["neato", "dot", "fdp", "sfdp", "twopi", "circo"]
 _TEST_FORMATS = ["dot", "pdf", "png", "jpeg", "svg"]