Skip to content

Commit ed67b75

Browse files
committed
run using multiple python versions
1 parent 3a25b0e commit ed67b75

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.github/actions/test/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,26 @@ inputs:
2323
description: 'Optional http headers'
2424
default: '{}'
2525

26+
python_version:
27+
required: false
28+
description: 'Python version to test with'
29+
default: '3.7'
30+
2631
runs:
2732
using: 'composite'
2833
steps:
2934
- uses: actions/checkout@v3
3035
with:
3136
repository: RelationalAI/rai-sdk-python
3237

33-
- name: Initialize Python 3.7
38+
- name: Initialize Python
3439
uses: actions/setup-python@v2
3540
with:
36-
python-version: 3.7
41+
python-version: ${{ matrix.python-version || inputs.python_version }}
3742

3843
- name: Install dependencies
3944
run: |
4045
python -m pip install --upgrade pip
41-
pwd
42-
ls
4346
pip install -r requirements.txt
4447
pip install -e ./
4548
shell: bash

.github/workflows/build.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
strategy:
1212
matrix:
13+
python-version: [3.7, 3.8, 3.9, 3.10, 3.11]
1314
run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30]
15+
1416
steps:
1517
- uses: actions/checkout@v3
16-
17-
- name: Initialize Python 3.7
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: 3.7
21-
22-
- name: Install dependencies
23-
run: |
24-
python -m pip install --upgrade pip
25-
pip install flake8
26-
27-
- name: flake8 linter
28-
run: flake8 .
29-
3018
- uses: ./.github/actions/test
3119
with:
3220
client_id: ${{ secrets.CLIENT_ID }}

0 commit comments

Comments
 (0)