Skip to content

Commit c98f90d

Browse files
committed
Run notebooks and examples with all supported Python versions.
Signed-off-by: chenkins <[email protected]>
1 parent 9695de0 commit c98f90d

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

.github/workflows/checks.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,16 @@ jobs:
5252

5353
notebooks:
5454
runs-on: ubuntu-22.04
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
python-version: [ "3.10", "3.11", "3.12" ]
5559
steps:
5660
- uses: actions/checkout@v4
5761
- name: Set up Python ${{ matrix.python-version }}
5862
uses: actions/setup-python@v5
5963
with:
60-
python-version: "3.10"
64+
python-version: ${{ matrix.python-version }}
6165
- name: Start Redis
6266
uses: supercharge/[email protected]
6367
with:
@@ -72,12 +76,16 @@ jobs:
7276

7377
examples:
7478
runs-on: ubuntu-22.04
79+
strategy:
80+
fail-fast: false
81+
matrix:
82+
python-version: [ "3.10", "3.11", "3.12" ]
7583
steps:
7684
- uses: actions/checkout@v4
7785
- name: Set up Python ${{ matrix.python-version }}
7886
uses: actions/setup-python@v5
7987
with:
80-
python-version: "3.10"
88+
python-version: ${{ matrix.python-version }}
8189
- name: Install tox
8290
run: |
8391
python -m pip install --upgrade pip

.github/workflows/main.yml

+11-3
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ jobs:
5454

5555
notebooks:
5656
runs-on: ubuntu-22.04
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
python-version: [ "3.10", "3.11", "3.12" ]
5761
steps:
5862
- uses: actions/checkout@v4
5963
- name: Set up Python ${{ matrix.python-version }}
6064
uses: actions/setup-python@v5
6165
with:
62-
python-version: "3.10"
66+
python-version: ${{ matrix.python-version }}
6367
- name: Start Redis
6468
uses: supercharge/[email protected]
6569
with:
@@ -74,12 +78,16 @@ jobs:
7478

7579
examples:
7680
runs-on: ubuntu-22.04
81+
strategy:
82+
fail-fast: false
83+
matrix:
84+
python-version: [ "3.10", "3.11", "3.12" ]
7785
steps:
7886
- uses: actions/checkout@v4
79-
- name: Set up Python
87+
- name: Set up Python ${{ matrix.python-version }}
8088
uses: actions/setup-python@v5
8189
with:
82-
python-version: "3.10"
90+
python-version: ${{ matrix.python-version }}
8391
- name: Install tox
8492
run: |
8593
python -m pip install --upgrade pip

tox.ini

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tox]
2-
env_list = py{310,311,312},notebooks,py{310,311,312}-ml,py{310,311,312}-verify-install
2+
env_list = py{310,311,312},py{310,311,312}-notebooks,py{310,311,312}-ml,py{310,311,312}-verify-install
33

44
[gh-actions]
55
python =
@@ -38,6 +38,7 @@ deps =
3838
set_env =
3939
BENCHMARK_EPISODES_FOLDER = {tox_root}/episodes
4040
commands =
41+
python --version
4142
python -m pytest {posargs} --ignore=tests/ml
4243

4344
[testenv:py{310,311,312}-ml]
@@ -90,21 +91,23 @@ deps =
9091
commands =
9192
python benchmarks/profile_all_examples.py
9293

93-
[testenv:examples]
94-
base_python = python3.10
94+
[testenv:py{310,311,312}-examples]
95+
platform = linux|linux2|darwin
9596
deps =
9697
-r requirements-dev.txt
9798
commands =
99+
python --version
98100
python benchmarks/run_all_examples.py
99101

100-
[testenv:notebooks]
101-
base_python = python3.10
102+
[testenv:py{310,311,312}-notebooks]
103+
platform = linux|linux2|darwin
102104
allowlist_externals =
103105
bash
104106
pwd
105107
deps =
106108
-r requirements-dev.txt
107109
commands =
110+
python --version
108111
python -m pytest --nbmake \
109112
notebooks/simple-graph-plot-2022.ipynb \
110113
notebooks/Agent-Close-Following.ipynb \

0 commit comments

Comments
 (0)