Skip to content

feat(trie): TrieCharLegacy, expanded dict-op benchmarks, and real-text e2e benchmarks #148

feat(trie): TrieCharLegacy, expanded dict-op benchmarks, and real-text e2e benchmarks

feat(trie): TrieCharLegacy, expanded dict-op benchmarks, and real-text e2e benchmarks #148

name: Test nlpo3-python
on:
push:
branches:
- main
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- "model/**"
- "nlpo3-python/src/**"
- "nlpo3-python/nlpo3/**"
- "nlpo3-python/tests/**"
- "nlpo3-python/Cargo.toml"
- "nlpo3-python/pyproject.toml"
- ".github/workflows/test-nlpo3-python.yml"
pull_request:
branches:
- main
paths:
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- "model/**"
- "nlpo3-python/src/**"
- "nlpo3-python/nlpo3/**"
- "nlpo3-python/tests/**"
- "nlpo3-python/Cargo.toml"
- "nlpo3-python/pyproject.toml"
- ".github/workflows/test-nlpo3-python.yml"
defaults:
run:
working-directory: nlpo3-python
jobs:
test-python:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10", "3.9"]
include:
- os: windows-latest
python-version: "3.14"
- os: macos-latest
python-version: "3.14"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout source code
uses: actions/checkout@v6
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Build wheel
run: |
pip install -U pip
pip install -U build setuptools setuptools-rust twine wheel
python -m build --wheel
- name: Check wheel metadata
run: python -m twine check dist/*
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.14'
- name: Install wheel
run: pip install --no-index --find-links=dist nlpo3
# Since we don't know the exact name of the wheel from previous step,
# use --find-links instead.
- name: Test
run: |
cd tests
python -m unittest