test.yml 1.0 KB

1234567891011121314151617181920212223242526272829
  1. name: test
  2. on:
  3. push:
  4. branches:
  5. - main
  6. pull_request:
  7. branches:
  8. - main
  9. jobs:
  10. whisper-test:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. python-version: ['3.8', '3.9', '3.10', '3.11']
  15. pytorch-version: [1.13.1, 2.0.0]
  16. exclude:
  17. - python-version: '3.11'
  18. pytorch-version: 1.13.1
  19. steps:
  20. - uses: conda-incubator/setup-miniconda@v2
  21. - run: conda install -n test ffmpeg python=${{ matrix.python-version }}
  22. - run: pip3 install torch==${{ matrix.pytorch-version }}+cpu --index-url https://download.pytorch.org/whl/cpu
  23. - uses: actions/checkout@v3
  24. - run: echo "$CONDA/envs/test/bin" >> $GITHUB_PATH
  25. - run: pip install .["dev"]
  26. - run: black --check --diff -t py38 --include '(\.pyi?)$' .
  27. - run: isort --check --diff .
  28. - run: flake8 --ignore E203,W503,W504,E501,E731,E741 .
  29. - run: pytest --durations=0 -vv -k 'not test_transcribe or test_transcribe[tiny] or test_transcribe[tiny.en]' -m 'not requires_cuda'