40 lines
970 B
YAML
40 lines
970 B
YAML
name: Run tests
|
|
|
|
on:
|
|
push:
|
|
|
|
#pull_request:
|
|
#branches: ['main', 'develop']
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
pytest:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: 3.9
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install .
|
|
sudo apt-get install libsndfile1-dev
|
|
pip install pytest
|
|
|
|
|
|
|
|
- name: Run pytest
|
|
env:
|
|
HF_TOKEN : ${{ secrets.HF_TOKEN }}
|
|
run: |
|
|
python -c "import os; print('True' if 'HF_TOKEN' in os.environ else 'False')"
|
|
python -c "from scraibe import Scraibe;import os; print(Scraibe(use_auth_token=os.environ.get('HF_TOKEN'), verbose = True).autotranscribe('test/audio_test_1.mp4'))"
|
|
|