Remove Node.js 16 support and add Node.js 22 support #899
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Unittest for Python | |
on: | |
push: | |
paths-ignore: | |
- 'javascript/**' | |
- 'java/**' | |
pull_request: | |
paths-ignore: | |
- 'javascript/**' | |
- 'java/**' | |
permissions: | |
contents: read | |
jobs: | |
python-unittest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: [3.8, 3.9, '3.10'] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Setup python ${{ matrix.python-version }} | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install requirements | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ".[dev]" | |
- name: Run unittest | |
run: pytest ./tests | |
- name: Install Jax | |
if: ${{ matrix.os != 'windows-latest' && matrix.python-version >= '3.9' }} | |
run: pip install ".[jaxcpu]" | |
- name: Run unittest with Jax | |
if: ${{ matrix.os != 'windows-latest' && matrix.python-version >= '3.9' }} | |
run: pytest ./scripts/tests |