Skip to content

Commit 0ed1bfa

Browse files
vrouletOptaxDev
authored and
OptaxDev
committed
Add tests on python 3.13
PiperOrigin-RevId: 749051219
1 parent fc92c94 commit 0ed1bfa

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

.github/workflows/tests.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
2828
with:
29-
python-version: "3.11"
29+
python-version: "3.12"
3030
cache: "pip"
3131
cache-dependency-path: "pyproject.toml"
3232
- name: Install linting dependencies
@@ -51,7 +51,7 @@ jobs:
5151
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5252
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
5353
with:
54-
python-version: "3.11"
54+
python-version: "3.12"
5555
cache: "pip"
5656
cache-dependency-path: "pyproject.toml"
5757
- name: Install ruff and lint check
@@ -65,13 +65,27 @@ jobs:
6565
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6666
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
6767
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
68+
pytype:
69+
name: "Check types with pytype"
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
73+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
74+
with:
75+
python-version: "3.13"
76+
cache: "pip"
77+
cache-dependency-path: "pyproject.toml"
78+
- name: Check types with pytype
79+
run: |
80+
python3 -m pip install --quiet --upgrade pytype
81+
pytype "optax" -j auto --keep-going --disable import-error
6882
doctests:
6983
needs: [pre-commit, linting, ruff-lint] # do not run doctests if linting fails
7084
name: "Doctests on ${{ matrix.os }} with Python ${{ matrix.python-version }}"
7185
runs-on: "${{ matrix.os }}"
7286
strategy:
7387
matrix:
74-
python-version: ["3.11"] # only build docs with a somewhat latest python
88+
python-version: ["3.12"] # only build docs with a somewhat latest python
7589
os: [ubuntu-latest]
7690
steps:
7791
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -93,14 +107,14 @@ jobs:
93107
runs-on: "${{ matrix.os }}"
94108
strategy:
95109
matrix:
96-
python-version: ["3.10", "3.11", "3.12"]
110+
python-version: ["3.10", "3.11", "3.12", "3.13"]
97111
os: [ubuntu-latest]
98112
jax-version: [newest]
99113
include:
100114
- python-version: "3.10"
101115
os: "ubuntu-latest"
102116
jax-version: "0.4.27" # Keep version in sync with pyproject.toml and copy.bara.sky!
103-
- python-version: "3.12"
117+
- python-version: "3.13"
104118
os: "ubuntu-latest"
105119
jax-version: "nightly"
106120
steps:

test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ python3 -m pip wheel --no-deps dist/optax-*.tar.gz --wheel-dir "${TEMP_DIR}"
6969
python3 -m pip install --quiet "${TEMP_DIR}/optax-"*.whl
7070

7171
# Check types with pytype.
72-
python3 -m pip install --quiet pytype
72+
python3 -m pip install --quiet --upgrade pytype
7373
pytype "optax" -j auto --keep-going --disable import-error
7474

7575
# Run tests using pytest.

0 commit comments

Comments
 (0)