Skip to content

Commit 0b2cdac

Browse files
authored
updating tests for multiple platforms
1 parent b6f1b7c commit 0b2cdac

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/test_and_publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ jobs:
1313
strategy:
1414
matrix:
1515
version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
16-
runs-on: ubuntu-latest
16+
platform: ["ubuntu-latest", "macos-latest", "windows-latest"]
17+
runs-on: ${{ matrix.platform }}
1718
steps:
1819
- uses: actions/checkout@v4
19-
- name: Set up Python ${{ matrix.version }}
20+
- name: Set up Python ${{ matrix.version }} on ${{ matrix.platform }}
2021
uses: actions/setup-python@v5
2122
with:
2223
python-version: ${{ matrix.version }}

.github/workflows/test_code.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ permissions:
2929
contents: read
3030

3131
jobs:
32-
build:
32+
test:
3333
strategy:
3434
matrix:
3535
version: ["3.10", "3.14"]

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
import pytest
23
import functools
34
import matplotlib
@@ -6,6 +7,11 @@
67
from sklearn import datasets
78

89

10+
# Only force headless backend in CI
11+
if os.environ.get("CI") == "true":
12+
matplotlib.use("Agg")
13+
14+
915
@pytest.fixture(autouse=True)
1016
def disable_plot(monkeypatch):
1117
# Patch plt.show to not halt testing flow, by making it not block

0 commit comments

Comments
 (0)