@@ -15,19 +15,47 @@ jobs:
1515 strategy :
1616 fail-fast : false
1717 matrix :
18- os : [windows-latest]
19- python-version : [3.9]
18+ os : [ubuntu-latest, macos-latest, windows-latest]
19+ python-version : [' 3.9' ]
2020 steps :
2121 - uses : actions/checkout@v4
2222 with :
2323 fetch-depth : 0
24- - name : Set up Python ${{ matrix.python-version }}
24+ - name : Set up Python ${{ matrix.python-version }} (non-Windows)
25+ if : runner.os != 'Windows'
2526 uses : actions/setup-python@v4
2627 with :
2728 python-version : ${{ matrix.python-version }}
28- - name : Install dependencies
29+ - name : Install openfst (macOS)
30+ if : runner.os == 'macOS'
31+ run : |
32+ brew install openfst
33+ echo "CPLUS_INCLUDE_PATH=/opt/homebrew/include:$CPLUS_INCLUDE_PATH" >> $GITHUB_ENV
34+ echo "LIBRARY_PATH=/opt/homebrew/lib:$LIBRARY_PATH" >> $GITHUB_ENV
35+ - name : Install dependencies (non-Windows)
36+ if : runner.os != 'Windows'
2937 run : |
3038 python -m pip install --upgrade pip
3139 pip install .[test]
40+ - name : Set up Conda (Windows)
41+ if : runner.os == 'Windows'
42+ uses : conda-incubator/setup-miniconda@v3
43+ with :
44+ python-version : ${{ matrix.python-version }}
45+ activate-environment : test
46+ - name : Install dependencies (Windows)
47+ if : runner.os == 'Windows'
48+ shell : bash -el {0}
49+ run : |
50+ conda install -c conda-forge pynini
51+ python -m pip install --upgrade pip
52+ pip install .[test] --no-deps
53+ pip install flake8 pytest importlib_resources
54+ - name : Lint with flake8
55+ shell : bash -el {0}
56+ run : |
57+ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
58+ flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3259 - name : Test with pytest
60+ shell : bash -el {0}
3361 run : pytest
0 commit comments