Skip to content

Improve cleanup and interrupt handling #1270

Improve cleanup and interrupt handling

Improve cleanup and interrupt handling #1270

Workflow file for this run

# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License
#
name: Unittests
# Allow to trigger the workflow manually (e.g. when deps changes)
on: [push, workflow_dispatch]
permissions:
contents: read
jobs:
unittest-job:
name: Unittests (Python ${{ matrix.python-version }}, JAX ${{ matrix.jax-version }})
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14']
jax-version: ['0.8.3', '0.9.0', '0.9.1', '0.9.2', '0.10.0', '0.10.1', '0.10.2', '0.11.0', '0.11.1', 'nightly']
exclude:
- python-version: '3.11'
jax-version: '0.11.0'
- python-version: '3.11'
jax-version: '0.11.1'
runs-on: ubuntu-latest
timeout-minutes: 30
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.jax-version }}
cancel-in-progress: true
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
persist-credentials: false
# Install deps
- uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
- run: pip --version
- if: matrix.jax-version == 'nightly'
run: pip install -e ".[test]" -U --pre jax jaxlib -i https://us-python.pkg.dev/ml-oss-artifacts-published/jax/simple/
- if: matrix.jax-version != 'nightly'
run: pip install -e ".[test]" "jax==${JAX_VERSION}"
env:
JAX_VERSION: ${{ matrix.jax-version }}
- run: pip freeze
# Run tests
- name: Run core tests
run: python -m unittest discover --pattern "*_test.py" --start-directory "pathwaysutils/test"