From 26d85ace5188c3b0e48d69a09bc3359db0c77614 Mon Sep 17 00:00:00 2001 From: nadamoukaddem Date: Fri, 23 Feb 2024 11:54:03 +0100 Subject: [PATCH] Add matrix strategy to CI workflow for testing with multiple Python versions --- .github/workflows/ci.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0b7afcd..1673d7bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python +# This workflow will install Python dependencies, run tests, and lint with multiple versions of Python # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python name: CI @@ -11,19 +11,24 @@ on: jobs: test-full: - runs-on: [ubuntu-latest] + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ["pypy3.9", "pypy3.10", "3.9", "3.10", "3.11", "3.12"] steps: - - name: + - name: Checkout code uses: actions/checkout@v3 - - name: Set up Python 3.10.12 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: - python-version: "3.10.12" + python-version: ${{ matrix.python-version }} - name: Install dependencies run: python -m pip install ".[test]" - name: Test with pytest run: python -m pytest +