commit-03898fd293c694fc7a4c3c75d08b65d480ce2381 #57
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: Unit and Functional Tests | |
run-name: commit-${{ github.sha }} | |
on: | |
workflow_dispatch: | |
schedule: | |
# Every Sunday at 10:00 UTC. | |
- cron: '00 10 * * 6' | |
jobs: | |
unit-tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 2 | |
matrix: | |
os: [macos-14-xlarge] # , macos-13-xlarge] | |
python-version: [3.11] # [3.9, 3.11] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# miniconda-version: "latest" | |
- name: Setup Conda Environment | |
shell: bash -el {0} | |
run: | | |
pip install -e .[evals,pipelines] | |
pip install flake8 | |
- name: Print system information | |
shell: bash -el {0} | |
run: | | |
$(which python) -c \ | |
"from argmaxtools.test_utils import AppleSiliconContextMixin; \ | |
print(AppleSiliconContextMixin().os_spec())" | |
- name: Word Timestamps Unit Tests | |
shell: bash -el {0} | |
run: | | |
TEST_DEV=cpu $(which python) -m unittest tests/test_word_timestamps.py | |
- name: Text Decoder Unit Tests | |
shell: bash -el {0} | |
run: | | |
TEST_DEV=cpu $(which python) tests/test_text_decoder.py | |
- name: Audio Encoder Unit Tests | |
shell: bash -el {0} | |
run: | | |
TEST_DEV=cpu $(which python) tests/test_audio_encoder.py | |
- name: Evaluate Unit Test | |
shell: bash -el {0} | |
run: | | |
$(which python) tests/test_evaluate.py --dataset librispeech-debug --pipeline WhisperKit | |
- name: Folder Evaluate Unit Test | |
shell: bash -el {0} | |
run: | | |
$(which python) tests/test_evaluate.py --dataset common_voice_17_0-debug-zip --pipeline WhisperKit --language-subset en | |
- name: Lint | |
shell: bash -el {0} | |
run: | | |
pip install flake8 | |
$(which flake8) whisperkit tests |