Skip to content

Commit 99d1351

Browse files
committed
Use matrix for python versions
Signed-off-by: Federico Busetti <[email protected]>
1 parent 7316dad commit 99d1351

File tree

6 files changed

+15
-99
lines changed

6 files changed

+15
-99
lines changed

.github/workflows/python-3.10.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/python-3.11.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/python-3.12.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/python-3.8.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/python-3.9.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,29 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
33

4+
name: Python tests
45

56
on:
6-
workflow_call:
7-
inputs:
8-
python-version:
9-
required: true
10-
type: string
7+
push:
8+
branches: [ "main" ]
9+
pull_request:
10+
branches: [ "main" ]
11+
# Allows you to run this workflow manually from the Actions tab
12+
workflow_dispatch:
1113

1214
jobs:
1315
test:
14-
runs-on: ubuntu-latest
15-
16+
strategy:
17+
matrix:
18+
version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
19+
os: [ubuntu-latest]
20+
runs-on: ${{ matrix.os }}
1621
steps:
1722
- uses: actions/checkout@v3
18-
- name: Set up Python ${{ inputs.python-version }}
23+
- name: Set up Python ${{ matrix.version }}
1924
uses: actions/setup-python@v4
2025
with:
21-
python-version: "${{ inputs.python-version }}"
26+
python-version: "${{ matrix.version }}"
2227
- name: Install dependencies
2328
run: |
2429
python -m pip install --upgrade pip
@@ -31,3 +36,4 @@ jobs:
3136
- name: Check typing
3237
run: |
3338
make typing
39+

0 commit comments

Comments
 (0)