Skip to content

fix: relax pynini version constraint to >=2.1.6 #143

fix: relax pynini version constraint to >=2.1.6

fix: relax pynini version constraint to >=2.1.6 #143

Workflow file for this run

name: UnitTest
on:
workflow_dispatch:
pull_request:
paths:
- '**.py'
- '**.tsv'
- '**.toml'
- '**.yml'
jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }} (non-Windows)
if: runner.os != 'Windows'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install openfst (macOS)
if: runner.os == 'macOS'
run: |
brew install openfst
echo "CPLUS_INCLUDE_PATH=/opt/homebrew/include:$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
echo "LIBRARY_PATH=/opt/homebrew/lib:$LIBRARY_PATH" >> $GITHUB_ENV
- name: Install dependencies (non-Windows)
if: runner.os != 'Windows'
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Set up Conda (Windows)
if: runner.os == 'Windows'
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
activate-environment: test
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
shell: bash -el {0}
run: |
conda install -c conda-forge pynini
python -m pip install --upgrade pip
pip install .[test] --no-deps
pip install flake8 pytest importlib_resources
- name: Lint with flake8
shell: bash -el {0}
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
shell: bash -el {0}
run: pytest