Skip to content

Commit

Permalink
Add matrix strategy to CI workflow for testing with multiple Python v…
Browse files Browse the repository at this point in the history
…ersions
  • Loading branch information
nadamoukaddem committed Feb 23, 2024
1 parent 3b5595f commit 26d85ac
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 26d85ac

Please sign in to comment.