From 233c67040113a6963d9d537aede8d8c21418880e Mon Sep 17 00:00:00 2001 From: Eric Joanis Date: Thu, 12 Dec 2024 13:39:26 -0500 Subject: [PATCH] ci: run pytest on a os X python-version matrix --- .github/workflows/tests.yml | 42 ++++++++++--------------------------- 1 file changed, 11 insertions(+), 31 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 17b3385..5b1bf85 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,41 +22,21 @@ jobs: - name: Run tests run: | CTEST_OUTPUT_ON_FAILURE=1 cmake --build build --target check + pytest: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + runs-on: ${{ matrix.os }} steps: - - name: Checkout - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - uses: actions/setup-python@v5 with: - python-version: "3.10" - - name: Install - run: | - pip3 install .[dev] - - name: Run tests - run: python3 -m pytest - wintest: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - name: Install - run: | - pip3 install .[dev] - - name: Run tests - run: python3 -m pytest - mactest: - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - - name: Install - run: | - pip install .[dev] - - name: Run tests - run: python -m pytest + python-version: ${{ matrix.python-version }} + - run: pip3 install .[dev] + - run: python3 -m pytest + nodetest: runs-on: ubuntu-latest steps: